pub enum CalWarning {
Show 15 variants
UnknownRelation {
relation: String,
span: Option<Span>,
},
DomainFieldWithoutTag {
field: String,
span: Option<Span>,
},
UnknownDomainPrefix {
prefix: String,
span: Option<Span>,
},
UnknownExtensionOption {
option: String,
span: Option<Span>,
},
DuplicateSetField {
field: String,
span: Option<Span>,
},
UnusedQueryParam {
name: String,
query: String,
span: Option<Span>,
},
DeprecatedPipeOperator {
span: Option<Span>,
},
IsCategoryOnNonRelation {
field: String,
category: String,
span: Option<Span>,
},
AssembleUnscopedSource {
labels: Vec<String>,
span: Option<Span>,
},
UnrecognizedWhereField {
field: String,
span: Option<Span>,
},
EachIterationCapped {
rendered: usize,
total: usize,
max: usize,
},
ContradictionScanBounded {
scanned: usize,
},
WithOptionInert {
option: &'static str,
statement: &'static str,
why: &'static str,
},
ScanBounded {
stage: String,
scanned: usize,
},
PipelineStageInert {
stage: String,
payload: &'static str,
why: &'static str,
},
}Expand description
Non-fatal CAL warnings emitted during parsing or execution.
Variants§
UnknownRelation
CAL-W001 — The relation name in a Fact grain is not one of the well-known OMS relations.
DomainFieldWithoutTag
CAL-W002 — A domain-prefixed field was used without a
corresponding @tag on the query.
UnknownDomainPrefix
CAL-W003 — A domain prefix was not recognised.
UnknownExtensionOption
CAL-W004 — An extension option in a WITH clause was not
recognised and will be ignored.
DuplicateSetField
CAL-W005 — A SET field name was specified more than once in the same statement; only the last value is used.
UnusedQueryParam
CAL-W006 — A parameter was supplied at the RUN call site but is not referenced in the saved query body.
DeprecatedPipeOperator
CAL-W007 — The bare pipe operator | before pipeline stages is
deprecated (removed in CAL 1.1). Use direct clause syntax instead
(e.g. RECALL facts ORDER BY confidence DESC LIMIT 10).
IsCategoryOnNonRelation
CAL-W008 — IS CATEGORY used on a non-relation field. The IS CATEGORY
check is only meaningful on the relation field; using it on other
fields silently produces no matches.
AssembleUnscopedSource
CAL-W009 — ASSEMBLE sources have inconsistent subject scoping. Some sources filter by subject while others don’t, which may return data from unrelated subjects.
UnrecognizedWhereField
CAL-W010 — A WHERE field on an untyped (RECALL all) query is not a
recognized field on any grain type. The filter is still applied per
grain (matching only grains that carry the field — likely none), so
this usually signals a misspelled field name. On a typed recall the
same situation is a hard CAL-E060 instead (#91: a filter that
cannot be honoured refuses rather than widening).
EachIterationCapped
CAL-W011 — A {{#each}} block hit the OMS CAL §10.8 iteration cap,
so the rendered output covers only the first max grains. The result
set itself is complete; only this rendering is short.
ContradictionScanBounded
CAL-W012 — A CONTRADICTIONS query’s candidate scan hit the executor’s
max_limit, so grains past it were never examined for fork status.
This exists because the useful answer to CONTRADICTIONS is often the
empty one, and an agent may act on it. “Nothing is contested” and
“nothing among the first N is contested” are different claims; without
this warning the second would be indistinguishable from the first.
WithOptionInert
CAL-W014 — A WITH option parsed and ran, but does nothing on the
statement it was attached to.
§5 promises that an option needing an unavailable backend “returns an honest error rather than silently degrading”. Several did neither: they parsed, ran, and returned output byte-identical to the same query without them. A hard error would break callers who have been passing these since 1.0, so the honest form is a warning that names the option and the surface — silence was the actual defect.
ScanBounded
CAL-W015 — A post-retrieval stage (ORDER BY, a type-specific WHERE
filter, COUNT) widened its scan to the executor’s max_limit and
still filled it, so it ranked/filtered/counted a bounded window rather
than the whole matching set.
The sibling of ContradictionScanBounded, generalized. ORDER BY
sorts the grains a statement already returned; without widening, that
is a page of default_limit rows, so ORDER BY priority DESC LIMIT 5
returned the top 5 of the newest 50 and looked exactly like the top
5 overall. Widening fixes every corpus up to max_limit; past that the
only honest thing left is to say so, because the answer is still a
well-formed list that happens to be wrong.
Fields
PipelineStageInert
CAL-W016 — A pipeline stage was attached to a payload it cannot act on
(e.g. ORDER BY on a multi-source ASSEMBLE, which returns an
assembled section list rather than a flat grain list).
These used to hit a catch-all passthrough arm and vanish with no error
and no warning, which contradicts docs/cal-reference.md §5: silence
means the option did something. Ordering an assembly is exactly the
case a host reaches for when rendering authored instruction blocks in
an intended order — and it was the one case that silently did nothing.
Implementations§
Trait Implementations§
Source§impl Clone for CalWarning
impl Clone for CalWarning
Source§fn clone(&self) -> CalWarning
fn clone(&self) -> CalWarning
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CalWarning
impl Debug for CalWarning
Source§impl Display for CalWarning
impl Display for CalWarning
Source§impl PartialEq for CalWarning
impl PartialEq for CalWarning
impl StructuralPartialEq for CalWarning
Auto Trait Implementations§
impl Freeze for CalWarning
impl RefUnwindSafe for CalWarning
impl Send for CalWarning
impl Sync for CalWarning
impl Unpin for CalWarning
impl UnsafeUnpin for CalWarning
impl UnwindSafe for CalWarning
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more