--- a/crates/jrsonnet-evaluator/src/typed/mod.rs +++ b/crates/jrsonnet-evaluator/src/typed/mod.rs @@ -2,7 +2,7 @@ pub(crate) mod conversions; pub use conversions::*; -use jrsonnet_gcmodule::Trace; +use jrsonnet_gcmodule::Acyclic; pub use jrsonnet_types::{ComplexValType, ValType}; use thiserror::Error; @@ -11,12 +11,12 @@ in_description_frame, Val, }; -#[derive(Debug, Error, Clone, Trace)] +#[derive(Debug, Error, Clone, Acyclic)] pub enum TypeError { #[error("expected {0}, got {1}")] ExpectedGot(ComplexValType, ValType), #[error("missing property {0} from {1}")] - MissingProperty(#[trace(skip)] Rc, ComplexValType), + MissingProperty(Rc, ComplexValType), #[error("every failed from {0}:\n{1}")] UnionFailed(ComplexValType, TypeLocErrorList), #[error( @@ -32,7 +32,7 @@ } } -#[derive(Debug, Clone, Trace)] +#[derive(Debug, Clone, Acyclic)] pub struct TypeLocError(Box, ValuePathStack); impl From for TypeLocError { fn from(e: TypeError) -> Self { @@ -54,7 +54,7 @@ } } -#[derive(Debug, Clone, Trace)] +#[derive(Debug, Clone, Acyclic)] pub struct TypeLocErrorList(Vec); impl Display for TypeLocErrorList { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { @@ -116,9 +116,9 @@ } } -#[derive(Clone, Debug, Trace)] +#[derive(Clone, Debug, Acyclic)] enum ValuePathItem { - Field(#[trace(skip)] Rc), + Field(Rc), Index(u64), } impl Display for ValuePathItem { @@ -131,7 +131,7 @@ } } -#[derive(Clone, Debug, Trace)] +#[derive(Clone, Debug, Acyclic)] struct ValuePathStack(Vec); impl Display for ValuePathStack { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {