Skip to content

nitx: recover early from two failure conditions - #2869

Open
xymus wants to merge 2 commits into
nitlang:masterfrom
xymus:nitx-fixes
Open

xymus wants to merge 2 commits into
nitlang:masterfrom
xymus:nitx-fixes

Conversation

@xymus

@xymus xymus commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Update nitx to recover cleanly from requests that can later trigger assertion failures:

  • Stop the execution of invalid requests early, like querying an entity that doesn’t exist. The logic of some of the command kinds assume a valid request and use as(not null) expressions which fails on an invalid request.

  • For request listing call sites, ensure we look only at call nodes that are real calls. This avoids looking into annotation arguments that are modeled as call nodes but aren't a real call expression and don’t actually act as a call site.

xymus added 2 commits November 4, 2026 20:57
Have nitx safely stop a command before executing one marked as an error,
preventing later failures. A few of the commands assume they are valid
and use `mproperty.as(not null)` which fails when invalid.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
The nitx command `call:` visits every `ASendExpr` under each property
and reads its callsite. It would fail on the arguments of annotations
which are stored as `ASendExpr` in the AST even thought they aren't real
calls and thus don't have a call site.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Test Results

    67 files     337 suites   11m 37s ⏱️
14 343 tests 13 817 ✅ 526 💤 0 ❌
14 759 runs  14 221 ✅ 538 💤 0 ❌

Results for commit 0f44918.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant