Skip to content

code-server --install-extension ms-python.python@<version> always installs the latest version #2626

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

Closed
ddurham2 opened this issue Jan 24, 2021 · 6 comments
Milestone

Comments

@ddurham2
Copy link

ddurham2 commented Jan 24, 2021

  • Web Browser: None
  • Local OS: n/a
  • Remote OS: within docker container
  • Remote Architecture: (from docker) Linux 1b4f61ce602c 5.4.0-60-generic Crash on Debian 8 #67-Ubuntu SMP Tue Jan 5 18:31:36 UTC 2021 x86_64 GNU/Linux
  • code-server --version: "3.8.0 c4610f7" and "3.7.2 a0db672"

This is not a problem with 3.7.1

When running ...

$ code-server --install-extension ms-python.python@2020.5.86806
Installing extensions...
Installing extension 'ms-python.python' v2021.1.502429796...
Extension 'ms-python.python' v2021.1.502429796 was successfully installed.

Notice that it installed a version different than what was requested. It seems to always install the latest, no matter what valid version I request.

Also, this happens... (just putting a different valid version now)

1b4f61ce602c:~$ code-server --install-extension ms-python.python@2020.12.424452561
Installing extensions...
Extension 'ms-python.python@2020.12.424452561' is already installed.

... which it isn't. See...

1b4f61ce602c:~$ code-server --list-extensions --show-versions
[email protected]
[email protected]

Please let me know if this is an upstream problem I need to file, and where.

Thanks!

@jsjoeio jsjoeio added help-wanted needs-investigation This issue needs to be further investigated labels Feb 2, 2021
@jsjoeio
Copy link
Contributor

jsjoeio commented Feb 2, 2021

Sorry for the late reply @ddurham2 - thanks for the detailed issue! I've added this to our Triage bucket and hope we can investigate soon!

A possible workaround - you should be able to install a specific version of an extension using the VSIX file directly and the "Install from VSIX" in the Extension Menu.

image

@ddurham2
Copy link
Author

ddurham2 commented Mar 14, 2021

@jsjoeio Thanks for the info. I do hope this gets fixed soon as my other work arounds are starting to fail.

As for installing the vsxi manually, is there a way to do that from the cli? (I'm in a Dockerfile here) I tried giving code-server --install-extension /path/to/file.vsxi but it saying it can't find the extension. The usage statement says I should be able to give it a vsxi file.

I'm wondering if installing via vsxi file path broke for the same reason that the '@Version' syntax broke (my original problem)?

Also, if I were to give it a vsxi file (like ms-python) which requires a dependency (like how ms-python also now depends on jupyter), should installing the vsxi from the cli automatically install dependencies?

@tseader
Copy link

tseader commented Mar 15, 2021

As for installing the vsxi manually, is there a way to do that from the cli? (I'm in a Dockerfile here) I tried giving code-server --install-extension /path/to/file.vsxi but it saying it can't find the extension. The usage statement says I should be able to give it a vsxi file.

I'm wondering if installing via vsxi file path broke for the same reason that the '@Version' syntax broke (my original problem)?

@ddurham2 - This is what I'm doing to install via vsix file, hope it helps!

RUN curl -# -L -o /tmp/ms-python-release.vsix "https://github.com/microsoft/vscode-python/releases/download/2020.5.86806/ms-python-release.vsix" && \
    code-server --version && \ 
    # Below line doesn't work due to a bug that always installs latest version... working around this with vsix file install
    #code-server --install-extension [email protected] && \
    code-server --install-extension /tmp/ms-python-release.vsix && \
    code-server --list-extensions --show-versions

# Add pre-defined user settings for convenience
COPY user_settings.yaml /home/coder/.local/share/code-server/User/settings.json

@mateuszkitlas
Copy link

I tried to workaround this with installing a manually downloaded version of this extension (or any other - this issue seems to affect all extensions) from this address:

url = f'https://extensions.coder.com/api/publishers/{ext.publisher}/vsextensions/{ext.name}/{ext.version}/vspackage'

but sadly, I get the newest version as well. This is kinda important for me to be able to download the right extensions version. Are there any updates on this issue?

@jsjoeio
Copy link
Contributor

jsjoeio commented May 25, 2021

@mateuszkitlas have you tried manually installing it from Open VSX? See docs.

@jsjoeio jsjoeio modified the milestones: On Deck, 3.11.0 May 25, 2021
@jsjoeio jsjoeio modified the milestones: 3.11.0, 3.12.0 Jul 19, 2021
@jsjoeio jsjoeio modified the milestones: 3.12.0, On Deck Aug 11, 2021
@stale
Copy link

stale bot commented Feb 7, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Feb 7, 2022
@stale stale bot closed this as completed Feb 12, 2022
@code-asher code-asher removed the needs-investigation This issue needs to be further investigated label Jul 11, 2024
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

5 participants