Closed ErnestDong closed 8 months ago
Thanks for this detailed bug report!
IMHO, installing the pre-release version of the extension makes more sense than skipping it as it has already been installed by the user, which means that the user doesn't mind the fact that it is still in pre-release
Could you please provide the output of:
$ code --list-extensions --show-version | grep ms-python.debugpy
And try:
$ code --install-extension ms-python.debugpy --pre-release
to see if this would work
Could you please provide the output of:
$ code --list-extensions --show-version | grep ms-python.debugpy
And try:
$ code --install-extension ms-python.debugpy --pre-release
to see if this would work
it works
➜ code --list-extensions --show-version | grep ms-python.debugpy
Warning: 'show-version' is not in the list of known options, but still passed to Electron/Chromium.
ms-python.debugpy
~
➜ code --install-extension ms-python.debugpy --pre-release
Installing extensions...
Extension 'ms-python.debugpy' v2023.3.12921009 is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: 'ms-python.debugpy@1.2.3'.
➜ code --list-extensions --show-version | grep ms-python.debugpy Warning: 'show-version' is not in the list of known options, but still passed to Electron/Chromium. ms-python.debugpy
I am sorry, it should be:
$ code --list-extensions --show-versions | grep ms-python.debugpy
➜ code --list-extensions --show-version | grep ms-python.debugpy Warning: 'show-version' is not in the list of known options, but still passed to Electron/Chromium. ms-python.debugpy
I am sorry, it should be:
$ code --list-extensions --show-versions | grep ms-python.debugpy
➜ code --list-extensions --show-versions | grep python
filwaline.vscode-postfix-python@0.1.3
ms-python.black-formatter@2023.4.1
ms-python.debugpy@2023.3.12921009
ms-python.python@2023.18.0
ms-python.vscode-pylance@2023.10.30
well, it seems vscode cli does not distinguish pre-release version and the release version.
Yeah, this is unfortunate, I didn't see any options to do this from code --help
either, perhaps we should reach out to the VS Code community to seek some help
$ code --help
Visual Studio Code 1.83.1
Usage: code [options][paths...]
To read from stdin, append '-' (e.g. 'ps aux | grep code | code -')
Options
-d --diff <file> <file> Compare two files with each other.
-m --merge <path1> <path2> <base> <result> Perform a three-way merge by providing paths for two modified versions of a file, the common origin of both modified versions and the output file to save merge results.
-a --add <folder> Add folder(s) to the last active window.
-g --goto <file:line[:character]> Open a file at the path on the specified line and character position.
-n --new-window Force to open a new window.
-r --reuse-window Force to open a file or folder in an already opened window.
-w --wait Wait for the files to be closed before returning.
--locale <locale> The locale to use (e.g. en-US or zh-TW).
--user-data-dir <dir> Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code.
--profile <profileName> Opens the provided folder or workspace with the given profile and associates the profile with the workspace. If the profile does not exist, a new empty one is created. A folder or workspace must be provided for the profile to take effect.
-h --help Print usage.
Extensions Management
--extensions-dir <dir> Set the root path for extensions.
--list-extensions List the installed extensions.
--show-versions Show versions of installed extensions, when using --list-extensions.
--category <category> Filters installed extensions by provided category, when using --list-extensions.
--install-extension <ext-id | path> Installs or updates an extension. The argument is either an extension id or a path to a VSIX. The identifier of an extension is '${publisher}.${name}'. Use '--force' argument to update to latest version. To install a specific version provide '@${version}'. For
example: 'vscode.csharp@1.2.3'.
--pre-release Installs the pre-release version of the extension, when using --install-extension
--uninstall-extension <ext-id> Uninstalls an extension.
--enable-proposed-api <ext-id> Enables proposed API features for extensions. Can receive one or more extension IDs to enable individually.
Troubleshooting
-v --version Print version.
--verbose Print verbose output (implies --wait).
--log <level> Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'. You can also configure the log level of an extension by passing extension id and log level in the following format:
'${publisher}.${name}:${logLevel}'. For example: 'vscode.csharp:trace'. Can receive one or more such entries.
-s --status Print process usage and diagnostics information.
--prof-startup Run CPU profiler during startup.
--disable-extensions Disable all installed extensions. This option is not persisted and is effective only when the command opens a new window.
--disable-extension <ext-id> Disable the provided extension. This option is not persisted and is effective only when the command opens a new window.
--sync <on | off> Turn sync on or off.
--inspect-extensions <port> Allow debugging and profiling of extensions. Check the developer tools for the connection URI.
--inspect-brk-extensions <port> Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection URI.
--disable-gpu Disable GPU hardware acceleration.
--disable-chromium-sandbox Use this option only when there is requirement to launch the application as sudo user on Linux or when running as an elevated user in an applocker environment on Windows.
--telemetry Shows all telemetry events which VS code collects.
Subcommands
tunnel Make the current machine accessible from vscode.dev or other machines through a secure tunnel
serve-web Make the current machine accessible from vscode.dev or other machines through a secure tunnel
Issue filed
Before this gets fixed, I recommend disabling this step with the following configuration:
[misc]
disable = ["vscode"]
Since there is nothing we can do at Topgrade (at least for now), I will label this issue upstream
Some progress about this issue (and the partial duplicate issue https://github.com/topgrade-rs/topgrade/issues/593 ) :
Since I developped this VSCode upgrade in Topgrade, I recently filed the PR https://github.com/microsoft/vscode/pull/197963 in VSCode to have a parsable output listing the origin of each extension (responding to the issue SteveLauC opened).
It will allow a fix in Topgrade to correctly handle:
The PR is currently on debate phase about the precise scope of the issue. When eventually it will be merged and upstreamed in a monthly release, I will create a PR here to fix these extensions update.
Erroneous Behavior
error when updating vscode extensions which are not released, such as debugpy
Expected Behavior
skip or update such extensions with preview
Steps to reproduce
install extensions without a release version, such as debugpy.
Possible Cause (Optional)
code
cli fails install such extensionProblem persists without calling from topgrade
Did you run topgrade through
Remote Execution
If yes, does the issue still occur when you run topgrade directlly in your remote host
Configuration file (Optional)
Additional Details
topgrade -V
):13.0.0Verbose Output (
topgrade -v
)