Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl+click into a relative filepath results in error #146853

Closed
joyceerhl opened this issue Apr 5, 2022 · 6 comments
Closed

Ctrl+click into a relative filepath results in error #146853

joyceerhl opened this issue Apr 5, 2022 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug github-repositories Issues related to GitHub Repositories javascript JavaScript support issues typescript Typescript support issues web Issues related to running VSCode in the web
Milestone

Comments

@joyceerhl
Copy link
Collaborator

joyceerhl commented Apr 5, 2022

  1. Go to https://github.dev/microsoft/vscode/blob/ff7237ac1915950ea116b6f4d389f2575b3f0819/src/vs/workbench/api/browser/mainThreadSecretState.ts#L10
  2. Ctrl+click on the relative filepath on L10: '../common/extHost.protocol'
  3. 🐛 file fails to open with the following error
    image

I repro this in v0.20.0 of GitHub Repositories so I don't think this is a regression.

VS Code appears to be trying to stat the vscode-vfs URI for this file, but the authority is missing, and Remote Repositories looks up the provider for a given vscode-vfs URI by checking the authority, so this is an invalid vscode-vfs URI. @bpasero do you happen to know what might be happening here?

@joyceerhl joyceerhl added the bug Issue identified by VS Code Team member as probable bug label Apr 5, 2022
@joyceerhl joyceerhl self-assigned this Apr 5, 2022
@joyceerhl joyceerhl transferred this issue from microsoft/vscode-remote-repositories-github Apr 5, 2022
@joyceerhl joyceerhl added web Issues related to running VSCode in the web github-repositories Issues related to GitHub Repositories labels Apr 5, 2022
@bpasero bpasero assigned jrieken and mjbvz and unassigned bpasero Apr 6, 2022
@bpasero
Copy link
Member

bpasero commented Apr 6, 2022

This originates from language support to find the reference for a symbol:

const next = model.firstReference()!;
const peek = model.references.length > 1 && gotoLocation === 'gotoAndPeek';
const targetEditor = await this._openReference(editor, editorService, next, this.configuration.openToSide, !peek);

image

I am not sure if this is coming from TypeScript, or possibly AnyCode, assigning some folks.

Btw easy to reproduce running out of sources with remote hub extension installed, even on desktop.

@bpasero
Copy link
Member

bpasero commented Apr 6, 2022

What is also interesting is that all the other imports (such as 'vs/workbench/services/extensions/common/extHostCustomers'), do not allow to navigate 🤔

@jrieken jrieken removed their assignment Apr 6, 2022
@mjbvz mjbvz modified the milestones: April 2022, May 2022 Apr 14, 2022
mjbvz added a commit to mjbvz/vscode that referenced this issue May 6, 2022
For microsoft#146853

Make sure we include the uri authority when serializing and then restoring the file paths we send to TSServer (similarly to how we already handle the uri scheme)
@mjbvz
Copy link
Collaborator

mjbvz commented May 6, 2022

Pushed a fix for the authority part: #148940

However TS still returns a path without a file extension in this case. Will keep open to continue investigation but may depend on microsoft/TypeScript#47600

mjbvz added a commit that referenced this issue May 6, 2022
For #146853

Make sure we include the uri authority when serializing and then restoring the file paths we send to TSServer (similarly to how we already handle the uri scheme)
@deepesh0102

This comment was marked as spam.

@karthikatl

This comment has been minimized.

@mjbvz mjbvz modified the milestones: On Deck, June 2024 May 20, 2024
@mjbvz mjbvz modified the milestones: June 2024, July 2024 Jun 24, 2024
@mjbvz mjbvz modified the milestones: July 2024, August 2024 Jul 24, 2024
@mjbvz mjbvz modified the milestones: August 2024, September 2024 Aug 23, 2024
@mjbvz mjbvz modified the milestones: September 2024, On Deck Sep 20, 2024
@joyceerhl
Copy link
Collaborator Author

This no longer repros 🎉

@joyceerhl joyceerhl removed their assignment Dec 9, 2024
@joyceerhl joyceerhl modified the milestones: On Deck, January 2025 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug github-repositories Issues related to GitHub Repositories javascript JavaScript support issues typescript Typescript support issues web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

6 participants