-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Summary
Three array features are not yet supported on the salsa incremental compilation path and fall back to the monolithic path. The affected tests explicitly use assert_compiles() instead of assert_compiles_incremental() with comments documenting the limitation.
Affected features
1. @n position syntax (subscript element selection by position)
@N syntax allows selecting array elements by dimension position (e.g., arr[@1] for the first element, matrix[@2, @1] for dimension reordering). Two tests retain the monolithic path for this reason:
dimension_position_single(line 341):arr[@1]-- scalar selection by positiondimension_position_and_wildcard(line 1359):cube[@1, *, @3]-- combining position syntax with wildcards
Note: the dimension_position_reorder test (line 366) using matrix[@2, @1] does use assert_compiles_incremental(), so some @N cases may already work on the incremental path.
2. MEAN with dynamic ranges
MEAN(data[start_idx:end_idx]) where the range bounds are variable references rather than literal constants. One test retains the monolithic path:
mean_with_dynamic_range(line 2022):MEAN(data[start_idx:end_idx])withstart_idxandend_idxas scalar constants
Why it matters
These tests silently fall back to the monolithic compilation path, which means they do not exercise the incremental pipeline. As monolithic-path code is eventually removed (per the salsa migration plan), these features will need incremental support or will regress.
Component(s) affected
simlin-engine:src/simlin-engine/src/db.rs(incremental compilation pipeline)simlin-engine:src/simlin-engine/src/array_tests.rs(test assertions)
Possible approaches
- Investigate what specifically fails when switching these tests to
assert_compiles_incremental()-- the error messages will indicate which incremental tracked function is missing the relevant array lowering logic. - The
@Nsyntax likely needs handling in the dimension resolution or subscript expansion phases of the incremental path. - Dynamic ranges for MEAN likely need the range size computation to be available during incremental compilation.
Context
Identified during review of the finish-salsa-migration branch. Related to but distinct from #295 (which covers module expansion, builtin expansion, and variable layout gaps).