Repository navigation
Add clickable error locations to UCM-emitted warnings/errors - #6326
Merged
Merged
Conversation
When UCM loads a .u file and reports a parse error, type error, or type warning, prepend a `path:line:col` reference (path relative to UCM's working directory) above each one, so clicking it in an IDE terminal like VSCode's jumps straight to the offending source. - PrintError: add `rangeForErrorNote` / `rangeForWarn`, which pick the location to point at — the cause's own location when it carries one, otherwise the innermost error term (for warnings, the offending occurrence). - Output: thread the source file name into the ParseErrors / TypeErrors / TypeWarns constructors (they previously carried only the source text). - OutputMessages: add `clickableSourceLocation` / `withSourceLocation`, gated on the watch directory being present. Transcripts pass no directory, so their output is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…k's new ParseErrors sites
pchiusano
requested changes
Nov 10, 2026
pchiusano
left a comment
Member
There was a problem hiding this comment.
Thanks, left one comment which I’ll fix up since it’s very mechanical.
| C.RedundantPattern loc -> rangeForAnnotated loc | ||
| C.InaccessiblePattern loc -> rangeForAnnotated loc | ||
| C.RunWatchTypeMismatch loc _ -> rangeForAnnotated loc | ||
| _ -> Nothing |
Member
There was a problem hiding this comment.
This is error prone, will start being wrong as soon as we add a new type of error and makes it harder as a reviewer to tell if everything has been covered even today. I’ll expand it out.
pchiusano
approved these changes
Nov 10, 2026
|
🤖 The merge queue's full run failed, which removed this pull request from the queue: https://github.com/unisonweb/unison/actions/runs/42845236172 |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 10, 2026
# Conflicts: # .github/workflows/proofs/formatting/2eb107dbb6a5090bf6343549359eaacdc7e4a567739f3fb9ac34050e8dd9c6af.txt # .github/workflows/proofs/tests/08f200d34526554d04570b0dba09fb609c98fcdc6dbe312fcefe8fe1ae11d826.txt # .github/workflows/proofs/transcripts/f44f38a34f56db28ff16d9d3ee2c09e25904bd51c5c44d62c225cbaea6bd9b38.txt
pchiusano
added a commit
to Baccata/unison
that referenced
this pull request
Nov 10, 2026
…akes one for a rename of another Every attestation file of a check held the same line (the infrastructure hash and the verdict), so git's rename detection paired a deleted attestation with an added one at 100% similarity. Two pull requests that both re-attested then renamed the same file to different names, a rename/rename conflict (unisonweb#6326 against trunk after unisonweb#6327 merged). The file now holds a 16-character prefix of the infrastructure hash, the verdict, and the hash it attests. Readers use the first two fields as before and compare the infrastructure hash by prefix, so existing files still read.
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.
Overview
When UCM is watching files, and upon compile errors/warnings, this adds a
$file:$line:$columnmessage, which is understood by many IDEs as being clickable.Interesting/controversial decisions
Only added to UCM when it is watch mode (verified by the presence of watch-directory).
Test coverage
No test added, mostly because enabling this feature only in watch mode prevents the automation of tests. Tested by hand :