Skip to content

Conversation

captbaritone
Copy link
Contributor

Our intention in Relay was for the response from the locate command to be treated as path:line:column to match the convention of path strings in CLI output used by most tools. For example, paths in stack traces or errors in compiler output.

This convention is a de facto standard understood by many terminal emulators. This means if a server implements a locate command it should be useful in GraphQL LSPs (like this one or Relay's) and also at the CLI, where a user could manually invoke the command and then cmd+click the result to jump to the correct location in their editor.

I'm not sure what if any tests/docs etc will need to change here, but I figured this PR could start the conversation.

Screen.Recording.2025-04-25.at.9.25.20.AM.mov

Verified

This commit was signed with the committer’s verified signature.
charIeszhao Charles Zhao
Our intention in Relay was for the response from the locate command to be treated as `path:line:column` to match the convention of path strings in CLI output used by most tools. For example, paths in stack traces or errors in compiler output.

This convention is a de facto standard understood by many terminal emulators. This means if a server implements a locate command it should be useful in GraphQL LSPs (like this one or Relay's) and also at the CLI, where a user could manually invoke the command and then cmd+click the result to jump to the correct location in their editor.
Copy link

changeset-bot bot commented Apr 25, 2025

⚠️ No Changeset found

Latest commit: b817e0d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hayes
Copy link
Contributor

hayes commented Apr 25, 2025

I opened a similar PR here: #3891

I think there is still a discrepancy here between 1 and 0 indexed line numbers

@captbaritone
Copy link
Contributor Author

Lol, I'm too slow. You even cced me. I'll close this in favor of yours.

@jonathanawesome
Copy link
Collaborator

@captbaritone are you good with closing this PR in favor of #3891?

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.

None yet

3 participants