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

Extension is generating URIs which are causing vscode-csharp to error in the diff view. #260

Closed
makzimus opened this issue Sep 12, 2023 · 3 comments · Fixed by #291
Closed
Labels
bug Something isn't working

Comments

@makzimus
Copy link

Please see the issue submitted for vscode-csharp here.

@makzimus makzimus added the bug Something isn't working label Sep 12, 2023
@mjcrouch
Copy link
Owner

mjcrouch commented Sep 12, 2023

thanks for reporting - it was quite a while ago but I seem to remember this being a rather hacky way to pass around the details we needed for the diff view & view of historic files in general (inspired by how gitlens worked at the time) - the information like @=1234 is really not an 'authority' but I recall there were some very annoying edge cases in vs code that made it impossible to pass the data in e.g. the query string where it would make more sense. (I don't remember the details at-all but iirc it was something like: when navigating between different versions of a file, the perforce api didn't have access to the query string for the open editor so we had no way of working out exactly what we should be displaying - may be totally off the mark)

So, perhaps there have been improvements in the core vs code that make it possible to do it in a better way, or perhaps it would be simpler to just modify the encoding to meet the URL spec whithout changing where we put it.

@tru
Copy link

tru commented Nov 12, 2024

Any news on this? It makes it hard to use this plugin in my project since I want to have C# extension work as well. Is there a workaround at least?

@mjcrouch
Copy link
Owner

Hi - I think I have a working fix for the issue - the code for handling perforce URIs is quite complicated but the encoding of the revision in the authority of the URI is as far as I can recall now just for display purposes - it's only referenced in the extension config for the forrmatting of the editor title and otherwise ignored.

So I can replace "#" with text like "-rev-" and "=" with text like "shelved-" and everything generally still works, just the display of the title changes slightly when opening a single file from the depot.

Hopefully will have a new version soon with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants