Skip to content

Consistently send verbatim URLs back to frontend#1268

Merged
lionel- merged 4 commits into
mainfrom
oak/salsa-27-wire-url
Jun 19, 2026
Merged

Consistently send verbatim URLs back to frontend#1268
lionel- merged 4 commits into
mainfrom
oak/salsa-27-wire-url

Conversation

@lionel-

@lionel- lionel- commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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 hands File instead of URLs, and callers that need a URL call wire_url().

Note that ArkFile still 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.

Ok(LocationLink {
origin_selection_range: None,
target_uri: target.file.path(db).to_url(),
target_uri: state.wire_url(target.file),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread crates/ark/src/lsp/symbols.rs
@lionel- lionel- force-pushed the oak/salsa-26-remove-document branch from 0b199bf to 0d8ba4e Compare June 16, 2026 17:18
@lionel- lionel- force-pushed the oak/salsa-27-wire-url branch from ce5b201 to ccd8780 Compare June 16, 2026 20:23
@lionel- lionel- force-pushed the oak/salsa-26-remove-document branch from bdb651b to bcaec36 Compare June 19, 2026 14:02
Base automatically changed from oak/salsa-26-remove-document to main June 19, 2026 14:03
@lionel- lionel- force-pushed the oak/salsa-27-wire-url branch from d00f7bc to 5cee100 Compare June 19, 2026 14:04
@lionel- lionel- merged commit 89e1ecc into main Jun 19, 2026
17 checks passed
@lionel- lionel- deleted the oak/salsa-27-wire-url branch June 19, 2026 14:04
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants