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

Go to definition doesn't open git file #294

Closed
zvondic opened this issue Oct 24, 2023 · 11 comments
Closed

Go to definition doesn't open git file #294

zvondic opened this issue Oct 24, 2023 · 11 comments

Comments

@zvondic
Copy link

zvondic commented Oct 24, 2023

We are using ISC Ensemble Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2018.1.7 (Build 721U) Fri Mar 18 2022 22:01:43 EDT and VS Code on windows remote desktop.
Git repository is located on Ensemble server and VS Code is connected by Remote SSH plugin to this repository.
Problem is that go to definition (F12) doesn't open file from git repository but opens file from cache database which is disabled for editing. Is there any chance how fix this behavior? When i want to edit any file i have to open it from explore and it is very non-productive.
gotodefinition

@isc-bsaviano
Copy link
Contributor

@zvondic I need to know a little bit more about your workspace folder to detemrine the cause. The Langauge Server uses the vscode-objectscript extension to resolve a URI for a file name. That extension uses your objectscript.export settings to determine what the URI would be if you had exported the file using the extension and checks if that exists. If it doesn't then the server copy is used. It;s possible that your export settings don't reflect the structure of your workspace. If you have a .code-workspace file, can you post its contents here? If not, can you post the contents of your .vscode/settings.json file instead please?

@zvondic
Copy link
Author

zvondic commented Oct 25, 2023 via email

@zvondic
Copy link
Author

zvondic commented Oct 25, 2023 via email

@gjsjohnmurray
Copy link
Collaborator

@zvondic attachments to emails sent to GitHub don't survive the journey. Please use the web interface to attach them to the issue.

@zvondic
Copy link
Author

zvondic commented Oct 25, 2023

@isc-bsaviano
Copy link
Contributor

@zvondic I think the problem may be your objectscript.export.folder setting. If you want to represent the workspace root, use "", not ".".

@zvondic
Copy link
Author

zvondic commented Oct 26, 2023

I changed but no success. :-(
image

@isc-bsaviano
Copy link
Contributor

@zvondic How did you get that workspace.json file? VS Code workspaces are .code-workspace files. I see that workspace.json file has a folder with the vscode-remote URI scheme. If your workspace is remote (that is, the URI scheme is not file for your local file system) then the main extension's code that tries to find the local file probably won't work.

@zvondic
Copy link
Author

zvondic commented Oct 26, 2023

Yes, as i wrote in my first post. I don't have any workspace.json file. Workspase is placed on remote server, and files are served by ssh-remote plugin in VS code. The worspace.json which i sent is self-created by VS code. Goto-reference isn't work properly, that's why I asked for help.

@isc-bsaviano
Copy link
Contributor

@zvondic I'm pretty sure that I correctly identified the issue in my previous comment. The main extension has a bunch of checks where it considers workspace folder with the scheme file to be local. This excludes your workspace folder, so it doesn't try to find a local copy of the file. We could make this check "NOT isfs or isfs-readonly" (our file system schemes) but I'm not sure if it would Just Work, of if there would be unintended consequences. I think this requires more discussion amongst the group that manages these extensions. Even though this is an issue with the main extension, I'll leave it open here since anyone can easily view the comment history. Thank you for reporting this.

@isc-bsaviano
Copy link
Contributor

@zvondic Please follow the linked issue for updates

@isc-bsaviano isc-bsaviano closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
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

No branches or pull requests

3 participants