Skip to content

fix(cli): check and run imports with trailing comments in checkup - #1498

Open
oxura wants to merge 1 commit into
bendlang:mainfrom
oxura:fix/checkup-commented-imports-20261011
Open

oxura wants to merge 1 commit into
bendlang:mainfrom
oxura:fix/checkup-commented-imports-20261011

Conversation

@oxura

@oxura oxura commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #1497.

A valid import ./bad.bend as Bad # comment checks the imported file normally, but --checkup treated it as a non-import: it exited 0 without any check/run. Good commented imports were skipped too. Accept the language's trailing # comment in the existing checkup import matcher; do not change the language parser or independent per-module execution.

The new permanent installed-CLI assertion checks both consequences: a commented bad import exits 1, and a commented good import actually runs and returns 5n. Existing uncommented checkup/closed-reader controls remain. The exact new assertion fails on unchanged source behavior and passes with the real rebuilt standalone CLI. No diagnostic wording or implementation-source assertions. README documents aliased checkup imports; hand-written GUIDE/CHANGELOG are unchanged.

Actual Linux x64 verification:

  • Before: the ordinary checker accepts the good aggregation syntax and rejects the bad module, while both commented checkups incorrectly return 0 with empty output.
  • Twenty real source/compiled CLI checkup executions cover good/bad comments, original plain imports, comments immediately after the alias, CRLF, a commented-out nonexistent import, a real missing import, an absolute path, and a mixed failing-then-good aggregation. Failures remain nonzero and the mixed aggregation still runs the good module.
  • Exact permanent assertion executed fail-before/pass-after using real CLI processes.
  • Standalone CLI rebuilt from this branch.
  • bun gates/repo.ts: 54/54; permanent caps and gate policy unchanged.

Full installer/archive/hub ping was not run because the sibling site checkout is unavailable; isolated assertion proof is not a claim that the full ping gate passed.

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.

CLI: --checkup exits green without checking imports that have trailing comments

1 participant