Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 32 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ members = [
"lib/vrl/cli",
"lib/vrl/compiler",
"lib/vrl/core",
"lib/vrl/diagnostic",
"lib/vrl/parser",
"lib/vrl/stdlib",
"lib/vrl/tests",
Expand Down Expand Up @@ -203,7 +202,8 @@ sha2 = { version = "0.10.0", optional = true }
hex = { version = "0.4.3", optional = true }

# VRL Lang
vrl = { path = "lib/vrl/core" }
vrl-compiler = { path = "lib/vrl/compiler" }
vrl-core = { path = "lib/vrl/core" }
vrl-stdlib = { path = "lib/vrl/stdlib" }

# Lookup
Expand Down
2 changes: 1 addition & 1 deletion benches/enrichment_tables_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use chrono::prelude::*;
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use enrichment::Case;
use vector::enrichment_tables::{file::File, Condition, Table};
use vrl::Value;
use vrl_core::Value;

criterion_group!(
name = benches;
Expand Down
2 changes: 1 addition & 1 deletion benches/remap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::collections::HashMap;
use chrono::{DateTime, Utc};
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use indexmap::IndexMap;
use indoc::indoc;
use shared::TimeZone;
use vector::{
config::{DataType, Output},
Expand All @@ -15,7 +16,6 @@ use vector::{
SyncTransform, TransformOutputsBuf,
},
};
use vrl::prelude::*;

criterion_group!(
name = benches;
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/grok/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ nom-regex = { version = "0.2.0", default-features = false }
# Internal
lookup = { path = "../../lookup" }
shared = { path = "../../shared" }
vrl-compiler = { path = "../../vrl/compiler" }
vrl-core = { path = "../../vrl/core" }

[build-dependencies]
lalrpop = { version = "0.19.6", default-features = false }
2 changes: 1 addition & 1 deletion lib/datadog/grok/src/ast.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use lookup::LookupBuf;
use vrl_compiler::Value;
use vrl_core::Value;

#[derive(Clone, Debug, PartialEq)]
pub struct GrokPattern {
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/grok/src/filters/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use nom::{
sequence::{preceded, terminated},
IResult,
};
use vrl_compiler::Value;
use vrl_core::Value;

use crate::{
ast::{Function, FunctionArgument},
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/grok/src/filters/keyvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use nom::{
use nom_regex::str::re_find;
use ordered_float::NotNan;
use regex::Regex;
use vrl_compiler::Value;
use vrl_core::Value;

use crate::{
ast::{Function, FunctionArgument},
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/grok/src/grok_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{convert::TryFrom, string::ToString};

use ordered_float::NotNan;
use strum_macros::Display;
use vrl_compiler::Value;
use vrl_core::Value;

use crate::{
ast::{Function, FunctionArgument},
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/grok/src/matchers/date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use chrono::{DateTime, FixedOffset, NaiveDate, NaiveDateTime, NaiveTime, Offset,
use chrono_tz::{Tz, UTC};
use peeking_take_while::PeekableExt;
use regex::Regex;
use vrl_compiler::Value;
use vrl_core::Value;

use crate::parse_grok::Error as GrokRuntimeError;

Expand Down
4 changes: 2 additions & 2 deletions lib/datadog/grok/src/parse_grok.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use itertools::{
Itertools,
};
use shared::btreemap;
use vrl_compiler::{Target, Value};
use vrl_core::{Target, Value};

use crate::{
grok_filter::apply_filter,
Expand Down Expand Up @@ -103,7 +103,7 @@ fn apply_grok_rule(source: &str, grok_rule: &GrokRule, remove_empty: bool) -> Re
#[cfg(test)]
mod tests {
use ordered_float::NotNan;
use vrl_compiler::Value;
use vrl_core::Value;

use super::*;
use crate::parse_grok_rules::parse_grok_rules;
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/grok/src/parse_grok_pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn parse_grok_pattern(input: &str) -> Result<GrokPattern, String> {
#[cfg(test)]
mod tests {
use lookup::{LookupBuf, SegmentBuf};
use vrl_compiler::Value;
use vrl_core::Value;

use super::*;
use crate::ast::{Destination, Function, FunctionArgument};
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/grok/src/parse_grok_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use itertools::{Itertools, Position};
use lazy_static::lazy_static;
use lookup::LookupBuf;
use regex::Regex;
use vrl_compiler::Value;
use vrl_core::Value;

use crate::{
ast::{self, Destination, GrokPattern},
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/grok/src/parser.lalrpop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::ast::*;
use crate::lexer::*;
use lookup::{LookupBuf, SegmentBuf, FieldBuf};
use ordered_float::NotNan;
use vrl_compiler::Value;
use vrl_core::Value;
grammar<'err, 'input>(input: &'input str);

extern {
Expand Down
5 changes: 3 additions & 2 deletions lib/enrichment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ publish = false
arc-swap = { version = "1.4.0", default-features = false }
dyn-clone = { version = "1.0.4", default-features = false }
chrono = { version = "0.4.19", default-features = false }
indoc = "1"
shared = { path = "../shared", default-features = false, features = [ "btreemap", "conversion" ] }
vrl-core = { package = "vrl", path = "../vrl/core" }

vrl-compiler = { path = "../vrl/compiler" }
vrl-core = { path = "../vrl/core" }
18 changes: 14 additions & 4 deletions lib/enrichment/src/find_enrichment_table_records.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
use std::collections::BTreeMap;

use vrl_core::prelude::*;
use indoc::indoc;
use vrl_compiler::{
expression,
function::{ArgumentList, Compiled, Example, FunctionCompileContext},
map, state, Expression, Function, Parameter, TypeDef,
};
use vrl_core::{
diagnostic::{DiagnosticError, ExpressionError},
kind, Context, Error, Kind, Resolved, Value,
};

use crate::{
vrl_util::{self, add_index, evaluate_condition},
Expand Down Expand Up @@ -117,7 +126,7 @@ impl Expression for FindEnrichmentTableRecordsFn {
.condition
.iter()
.map(|(key, value)| evaluate_condition(ctx, key, value))
.collect::<Result<Vec<Condition>>>()?;
.collect::<Result<Vec<Condition>, ExpressionError>>()?;

let select = self
.select
Expand All @@ -127,7 +136,7 @@ impl Expression for FindEnrichmentTableRecordsFn {
.iter()
.map(|value| Ok(value.try_bytes_utf8_lossy()?.to_string()))
.collect::<std::result::Result<Vec<_>, _>>(),
value => Err(value::Error::Expected {
value => Err(Error::Expected {
got: value.kind(),
expected: Kind::Array,
}),
Expand Down Expand Up @@ -176,6 +185,7 @@ mod tests {

use chrono::{TimeZone as _, Utc};
use shared::{btreemap, TimeZone};
use vrl_core::value;

use super::*;
use crate::test_util::{
Expand All @@ -198,7 +208,7 @@ mod tests {

let tz = TimeZone::default();
let mut object: Value = BTreeMap::new().into();
let mut runtime_state = vrl_core::state::Runtime::default();
let mut runtime_state = vrl_core::Runtime::default();
let mut ctx = Context::new(&mut object, &mut runtime_state, &tz);

registry.finish_load();
Expand Down
Loading