Skip to content

engine: parse errors in SMOOTH/DELAY helper variables are hidden #666

Closed

Description

@bpowers

When an internal helper variable that the engine creates for SMOOTH, DELAY, or TREND failed to parse, its errors were thrown away.
The only signal was a generic "failed to compile fragments for variables: ..." message naming the parent variable, not the actual error.
This hid a regression that broke C-LEARN from every check that looks at diagnostics.

Status

On main, a helper whose body fails to parse or lower returns its errors (ImplicitInputError::Lowering), and compile_implicit_var_fragment in src/simlin-engine/src/db/fragment_compile.rs reports each one as an error on the parent variable, underlined at the argument in the parent's equation.
The function this issue named, lower_implicit_var, no longer exists.

Pointers

Activity

  1. added
    bug
    engine
    on Jun 2, 2026
  2. changed the title [-]engine: lower_implicit_var drops helper-fragment parse errors silently[/-] [+]engine: parse errors in SMOOTH/DELAY helper variables are hidden[/+] on Oct 12, 2026
  3. bpowers commented on Oct 12, 2026

    @bpowers
    OwnerAuthor

    Closing: already fixed on main.

    lower_implicit_var is gone; implicit_fragment_input returns ImplicitInputError::Lowering(failures) (src/simlin-engine/src/db/fragment_compile.rs:682-684) and compile_implicit_var_fragment accumulates each failure as an Error diagnostic on the parent variable (fragment_compile.rs:862-875), landed in c2048c1 (#1040). db::lowering_scope_tests::a_helper_is_refused_where_the_plain_spelling_is (lowering_scope_tests.rs:548) pins that a SMTH1/PREVIOUS helper's refusal shows up on the parent with the plain spelling's code and span.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugengine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions