Repository navigation
Show the source file, line and column in CLI errors - #2208
Merged
nicolas-abril merged 1 commit intoNov 23, 2026
Merged
Conversation
YidaWeng
reviewed
Nov 22, 2026
YidaWeng
left a comment
Contributor
There was a problem hiding this comment.
I ran this on the PR head (03151a49) from a clean worktree.
bun gates/repo.ts->PASS: 56 / 56.bun bend2/main.ts tests/io/cli_source_location.bend->0.-o cli_source_location.js && bun cli_source_location.js->0.- Manual checks: entry-file error ->
main.bend:4:3; missing import -> importermain2.bend:1:8; error two imports deep ->b.bend:4:3. All correct.
Two small notes, neither blocking:
- The column is a UTF-16 code-unit offset, not a grapheme/visual column. For
"🙂" ++ nopethe CLI prints:4:11, which matches the existing caret position but is one past the visual column. If that is intended, a sentence in the PR or guide would help. book_locationfalls back tofiles.find(([, ns]) => ns === null)when the first match misses. With two files that fail to load, the reverse-orderseenentry could name the wrong one. The three covered cases pass, but a test with two broken imports, or matchingspan.filedirectly, would pin it down.
I did not rerun the 518 snapshot set; the new regression and the repository gate pass. The seen threading and the cli_publish signature look complete (only one cli_publish caller), and the --checkup fixtures are untouched.
This was referenced Nov 23, 2026
nicolas-abril
added a commit
to nicolas-abril/bend
that referenced
this pull request
Nov 24, 2026
, bendlang#2224-bendlang#2226, bendlang#2231, bendlang#2285, bendlang#2286, bendlang#2288 and others) One conflict, in emit_unfold: bendlang#2288 annotates an unfolded call's lets with the argument types instantiated by the earlier arguments; bendlang#2162's deep unfold keeps its arguments unannotated there and annotates them the same way after folding (its type walk renamed D, beside bendlang#2288's T). Both kept. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an imported module has an error, the CLI shows the definition and underlines the token. A developer reading the build log still has to find the file. For example, a typo in
lib/price.bendpreviously gave onlyLocation: totaland the excerpt.The CLI now appends the canonical source path and one-based line and column. The example produces this location.
The CLI uses the files the loader already tracked. An error in an import statement points to the statement in the importing file. The batch
--checkupformat stays compatible with existing test fixtures.Verification
--checkup.bend-linttests passed. The repository gate passed all 56 checks.