Skip to content

Issue with mismatch versions in @types/vscode and engines.vscode #455

Closed
@eamodio

Description

@eamodio

There seems to be a new(?) issue with version checking with @types/vscode and engines.vscode.

In this first example, I have engines.vscode set to ^1.46.0 and @types/vscode set to 1.45.1:

$ vsce package --yarn
 ERROR  @types/vscode 1.45.1 greater than engines.vscode ^1.46.0. Consider upgrade engines.vscode or use an older @types/vscode version
error Command failed with exit code 1.

In this example, I have engines.vscode set to ^1.45.0 and @types/vscode set to 1.45.1:

$ vsce package --yarn
 ERROR  @types/vscode 1.45.1 greater than engines.vscode ^1.45.0. Consider upgrade engines.vscode or use an older @types/vscode version
error Command failed with exit code 1.

IMO, both should succeed. Also in at least the first case the message is wrong way around too.

Activity

joaomoreno

joaomoreno commented on Jun 9, 2020

@joaomoreno
Member

There is definitely an issue in the comparison code, since this is wrong:

ERROR  @types/vscode 1.45.1 greater than engines.vscode ^1.46.0. Consider upgrade engines.vscode or use an older @types/vscode version

But this seems right to me:

ERROR  @types/vscode 1.45.1 greater than engines.vscode ^1.45.0. Consider upgrade engines.vscode or use an older @types/vscode version

@eamodio Why do you say both should succeed?

@octref Can you explain what the semantics behind this are? It seems the first case is a bug. As for the second case... why wouldn't that work?

self-assigned this
on Jun 9, 2020
eamodio

eamodio commented on Jun 9, 2020

@eamodio
ContributorAuthor

@joaomoreno yeah, you are right, the 2nd one should not succeed. I was just thinking that since ^1.45.0 is basically 1.45.x it felt like it should succeed, but agree that it shouldn't.

joaomoreno

joaomoreno commented on Jun 10, 2020

@joaomoreno
Member

Ah that makes it easier then! Let's fix 🔨

added this to the June 2020 milestone on Jun 10, 2020
added
bugIssue identified by VS Code Team member as probable bug
on Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @joaomoreno@eamodio

      Issue actions

        Issue with mismatch versions in @types/vscode and engines.vscode · Issue #455 · microsoft/vscode-vsce