microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.66k stars 28.68k forks source link

Install `preview` Version of Extension?.. #67003

Closed busticated closed 5 years ago

busticated commented 5 years ago

hey there :wave:

i'm developing an extension which depends on a handful of other extensions (expressed via the extensionDependencies field in my manifest / package.json file). it seems we are limited to only installing the most-recent, non-preview version of these extensions when installing via the code cli - e.g.

'/path/to/my/extension/.vscode-test/stable/Visual Studio Code.app/Contents/Resources/app/bin/code' --extensions-dir /path/to/3rd-party/extensions --install-extension marus25.cortex-debug --force

upon running the command shown above, i see:

Updating the Extension 'marus25.cortex-debug' to a newer version 0.2.3
Installing...
Extension 'marus25.cortex-debug' v0.2.1 was successfully installed!

when i ls into /path/to/3rd-party/extensions directory, i see: marus25.cortex-debug-0.2.1. likewise, cat'ing that extension's package.json, i see: "version": "0.2.1", which confirms that despite the encouraging log output i've actually not installed the latest version (0.2.3 which as of writing this is in preview mode - see: https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug).

is this a bug? is there a way to force installation of the latest regardless of preview mode?

thanks, -matt

bpasero commented 5 years ago

@sandy081 can you comment?

sandy081 commented 5 years ago

@busticated only latest version of the extension should be installed. Can you please provide information about your set up - What extensions do you have before triggering installing?

busticated commented 5 years ago

@sandy081

only latest version of the extension should be installed

do you mean non-preview in this case? iow, is what i'm describing expected behavior?

Can you please provide information about your set up

VSCode v1.30.2 macOS v10.13.6 (high sierra)

What extensions do you have before triggering installing?

none. this workflow is run as part of my extension development process. you should be able to replicate it by executing the command i included above

sandy081 commented 5 years ago

I see, its because latest version 0.2.3 is not compatible with VS Code v1.30.2 and hence the compatible version 0.2.1 is installed. Issue here is that the logs are not showing correctly and they have to be fixed.

sandy081 commented 5 years ago

To verify:

busticated commented 5 years ago

@sandy081

thanks for taking a look :+1:

its because latest version 0.2.3 is not compatible with VS Code v1.30.2

🤔 how so? looking at the history for their package.json file, i see it's been stable with:

"engines": {
        "vscode": "^1.28.0"
    }

since v0.2.0 (diff). my understanding is that the caret (^) indicates minor and patch versions up to but not including v2.0.0 are acceptable (e.g. v1.30.2 is supported).

are you saying it's incompatible in some other way?

sandy081 commented 5 years ago

I am sorry about my comment I was running v1.28.2.

Can you please check which version of VS Code are you running on and try on latest stable?

busticated commented 5 years ago

Can you please check which version of VS Code are you running on and try on latest stable?

ah, i see. i was running two copies - one locally (v1.28.2) and another globally (v1.30.2). sorry for the confusion. after upgrading my local copy to v1.30.2, i'm seeing cortext-debug@0.2.3 being installed as expected.

still, given my understanding of ^ rules, v1.28.2 should have been sufficient to support cortext-debug@0.2.3 but 🤷‍♂️

sandy081 commented 5 years ago

I just checked the engine property of cortext-debug@0.2.3 and it is

    "engines": {
        "vscode": "^1.29.0"
    },

It explains.