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

Remote-SSH removes query parameters on editor file: URIs #110377

Closed
mjcrouch opened this issue Apr 27, 2020 · 1 comment
Closed

Remote-SSH removes query parameters on editor file: URIs #110377

mjcrouch opened this issue Apr 27, 2020 · 1 comment
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders remote-connection verified Verification succeeded
Milestone

Comments

@mjcrouch
Copy link
Contributor

  • VSCode Version: 1.44.2
  • Local OS Version: Windows 7 / 10
  • Remote OS Version: RHEL 7.7
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

This is rather a specific issue - currently in my extension I open a diff editor, but in order to provide context commands for that editor, I also need to have some additional information about the diff / file for use in the context menu items. I've done this by encoding that additional information in the query portion of the URI for the right hand diff.

This works ok locally, but in remote-SSH the query parameters disappear so I can't get that information back when running the context commands

I suspect that it's presumably rewriting URIs into vscode-remote:// URIs and back again, and losing the query params in the process.

It also works ok for non file: URIs as they presumably are not rewritten

Possibly I "shouldn't" be encoding params into file: URIs but I haven't yet found a better way to store this context reliably

edit: I've spotted some other problems with using query params on file URIs (cpp extension causes errors, editor windows are out of sync when not saved) and I've discovered another way of doing almost all of what I need, using the isInDiffEditor and isInRightDiffEditor contexts, so I think I'm going to rework this part of my extension to avoid doing this. But I'll leave this here for now as it may be something you want to look into?

  1. Write an extension that:
    1. Opens a file: URI including a non-empty query string in the editor.
    2. Adds a context item to the editor title menu that logs the URI passed in to the command
  2. Open the file with query parameters and click said button
  3. Observe that the query parameters are not present in the URI

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No

@roblourens roblourens assigned alexdima and unassigned roblourens Nov 6, 2020
@alexdima alexdima transferred this issue from microsoft/vscode-remote-release Nov 11, 2020
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug remote Remote system operations issues labels Nov 16, 2020
@alexdima alexdima added remote-connection and removed remote Remote system operations issues labels Oct 15, 2021
@alexdima alexdima added this to the October 2021 milestone Oct 27, 2021
@bpasero bpasero added the author-verification-requested Issues potentially verifiable by issue author label Oct 28, 2021
@jrieken jrieken added the verified Verification succeeded label Oct 28, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders remote-connection verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants
@roblourens @bpasero @jrieken @alexdima @mjcrouch and others