Consistently send verbatim URLs back to frontend#1268
Merged
Conversation
79aae40 to
0b199bf
Compare
b06b7da to
ce5b201
Compare
DavisVaughan
approved these changes
Jun 12, 2026
| Ok(LocationLink { | ||
| origin_selection_range: None, | ||
| target_uri: target.file.path(db).to_url(), | ||
| target_uri: state.wire_url(target.file), |
Contributor
There was a problem hiding this comment.
We had a discussion on Friday about how it was nice that goto-definition was completely separate from ArkFile
But this ties it back together because wire_url() queries ArkFile.url
What is the end goal?
Contributor
Author
There was a problem hiding this comment.
Nope as we discussed ArkFile is temporary state. But I'll pull the wire URL into an OpenFile type as we discussed, this will look more like the final shape
0b199bf to
0d8ba4e
Compare
ce5b201 to
ccd8780
Compare
bdb651b to
bcaec36
Compare
d00f7bc to
5cee100
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Branched from #1267
Progress towards #1212
This PR straightens out the handing of verbatim wire URLs back to the frontend, so that our lexically normalised paths don't leak out (see #1250).
New
WorldState::wire_url()method that resolves verbatim URLs for open files. The LSP layer calls it when communicating URLs back to the frontend, instead of the lexically-normalised paths that travel through the analysis layers.The goto-definition, find-references, and rename handlers now use that method to create wire URLs.
indexer::map()now handsFileinstead of URLs, and callers that need a URL callwire_url().Note that
ArkFilestill contains a copy of the verbatim URLs because Ark's diagnostics and roxygen handlers still use them. This is a temporary situation until these handlers are updated to the modern layering.