Skip to content

engine: compile_implicit_var_phase_bytecodes still swallows its codegen error (unattributed helper failures) #1000

Closed

Description

@bpowers

Summary

#994 made a codegen rejection during per-variable fragment compilation attributable — it now emits a diagnostic naming the variable and the construct codegen refused, where previously it produced nothing at all.

compile_implicit_var_phase_bytecodes (src/simlin-engine/src/db/fragment_compile.rs:1022) was not included and still discards its codegen error the same way. So a failure in an implicit helper still surfaces only as the unattributed assembly message:

failed to compile fragments for variables: $⁚s⁚0⁚arg0

with nothing saying which construct was refused. That is the #913 shape.

This was disclosed as scope in #994's own comment rather than left implied, and is filed so it is not lost. The fix is the same shape as the one already landed: route through compile_phase_to_per_var_bytecodes_reporting and accumulate the reason.

Two things to be careful of, both learned from the landed change:

  1. Severity. The landed one uses Error because the model does not simulate; verify that holds for the implicit-helper path too rather than inheriting it. The blast radius there was measured (a sweep across the test/ corpus confirmed added rows land only on projects that already fail to compile, and no compiling project gains an error) — do the same here rather than assuming symmetry.
  2. The variable name must be interpolated into the message, not left on the variable field alone. errors.rs's Assembly arm never renders that field and the CLI prints only the message, so a field-only version names the variable nowhere a user looks.

Related: #913.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions