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

Four number version string with semver #415

Closed
sguillia opened this issue Jan 20, 2020 · 13 comments
Closed

Four number version string with semver #415

sguillia opened this issue Jan 20, 2020 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@sguillia
Copy link

sguillia commented Jan 20, 2020

Hello


In my package.json

    "version": "0.0.1-1"

Output of vsce publish

 ERROR  The version string '0.0.1-1' doesn't conform to the requirements for a version. It must be one to four numbers in the range 0 to 2147483647, with each number seperated by a period. It must contain at least one non-zero number.


In my package.json

    "version": "0.0.1.1"

Output of vsce publish

 ERROR  Invalid extension version '0.0.1.1'

Does vsce support any four-number version string?

I believe, if I am not mistaken, that the former error message is wrong.

Best,
Simon

@joaomoreno
Copy link
Member

Semver doesn't not support four numbers: https://semver.org/

@sguillia
Copy link
Author

@joaomoreno Semver does support four numbers, the fourth one is called prerelease.

If it would not, vsce erroneously says that the version string must be one to four numbers.

Please update the error message if you do not support prereleases.

@joaomoreno
Copy link
Member

Oh I see. Actually, the first error message seems to be coming from the server. I'll update VSCE to catch that error earlier and let the user know what is supported.

@joaomoreno joaomoreno self-assigned this Jan 21, 2020
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Jan 21, 2020
@joaomoreno joaomoreno added this to the January 2020 milestone Jan 21, 2020
joaomoreno added a commit that referenced this issue Jan 21, 2020
@sguillia
Copy link
Author

Many thanks

@mjbvz mjbvz added the verified Verification succeeded label Jan 29, 2020
@sean-mcmanus
Copy link

@joaomoreno This change breaks our C/C++ extension's vsix publishing. We create vsix's with versions like 0.26.3-insiders4 (https://github.com/microsoft/vscode-cpptools/releases/tag/0.26.3-insiders4) and 0.27.0-multiroot2 for internal testing. Can you re-enable our scenario to work?

@WardenGnaw
Copy link
Member

WardenGnaw commented Jan 31, 2020

ERROR The version string '0.0.1-1' doesn't conform to the requirements for a version. It must be one to four numbers in the range 0 to 2147483647, with each number seperated by a period. It must contain at least one non-zero number.

The four in this error message should be three.

Since semver expects <major>.<minor>.<patch>[-<prerelease>]

The documentation on prerelease is:

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92.

@sherryyshi
Copy link

This is breaking our build as well. Please reopen and fix this, thanks!

@sean-mcmanus
Copy link

@sherryyshi The workaround we're using is to install "vsce@1.71" instead of just "vsce".

@eine
Copy link

eine commented Feb 2, 2020

Oh I see. Actually, the first error message seems to be coming from the server. I'll update VSCE to catch that error earlier and let the user know what is supported.

@joaomoreno, can you please confirm that something changed upstream (on the server) which introduced a regression? Until a few days ago, pre-release fields were supported for several weeks/months, as reported by the many users that have found their workflows broken.

Should the code upstream have not changed, I believe that this might be a poor (limited) implementation of semver parsing on the server. @sguillia's second syntax doesn't seem correct, but the first one should be accepted. The difference compared to other previously working solutions (as reported by @sean-mcmanus), is that @sguillia's pre-release starts with a digit, not an alphabetic character. Is it possible that the server supports pre-releases starting with non-digit characters only? Should that be the case, I would ask to revert e4a8df5 ASAP.

@eine eine mentioned this issue Feb 2, 2020
@joaomoreno
Copy link
Member

joaomoreno commented Feb 3, 2020

VSCE never prevented prerelease fields, but the Marketplace never supported them. The only reason why @sean-mcmanus's scenario works is because those versions were never uploaded to the Marketplace.

I can revert this change on VSCE, since it enables side-loading scenarios. But the Marketplace will stay as is, as it always has.

Fix coming in 1.73.0

joaomoreno added a commit that referenced this issue Feb 3, 2020
This reverts commit e4a8df5.
@bobbrow
Copy link
Member

bobbrow commented Feb 3, 2020

Thank you @joaomoreno. Side-loading is an important scenario for us so we appreciate you adding support for prerelease back in.

@sherryyshi
Copy link

Yes thank you @joaomoreno :) Our extension is internal to Microsoft and therefore also not in the Marketplace.

@sguillia
Copy link
Author

sguillia commented Feb 3, 2020

Indeed. For future users, the error message from the marketplace should explicitly state that pre-releases are not supported on the marketplace

rmanalan pushed a commit to launchdarkly/ld-vscode that referenced this issue Jan 29, 2021
Even though vsce says that it supports semver, it turns out that the Marketplace doesn't support prereleases (microsoft/vscode-vsce#415 (comment))
rmanalan pushed a commit to launchdarkly/ld-vscode that referenced this issue Jan 29, 2021
Even though vsce says that it supports semver, it turns out that the Marketplace doesn't support prereleases (microsoft/vscode-vsce#415 (comment))
rmanalan added a commit to launchdarkly/ld-vscode that referenced this issue Feb 4, 2021
* Store Refactor - Redo (#49)

* only update global flag metadata based on refresh rate

treeview gets all info from flagstore

add refresh rate config options

* lint

* remove console

* remove unused imports

disable events

* make event readonly

* make metadata private

remove console logs

* fixes to work for initial install

* remove console

* remove unused property and function

* remove unused function

* remove console log

* named import for lodash

remove commented lines

* remove unneeded window message

change comparison

* fix promises

* remove unused function

* Update src/extension.ts

Co-authored-by: Arnold Trakhtenberg <arnold@launchdarkly.com>

* Update src/extension.ts

Co-authored-by: Arnold Trakhtenberg <arnold@launchdarkly.com>

* fixes

* remove console log

Co-authored-by: Dan O'Brien <dobrien@launchdarkly.com>
Co-authored-by: Arnold Trakhtenberg <arnold@launchdarkly.com>

* User Agent (#52)

* update User-Agent
* fix error message

* Enabled status at top of Treeview (#51)

* move enabled icon to top level

* handle changes in variations

* add basic interface between classes

* Using Code References to Power Aliases (#50)

* Check coderefs version

* remove console logs

* set timeout on child process

* lint

* remove unused taskDefinition

* check coderefs path is set

* lint

* add search ability

* add icons for searching aliases

* add list of keys as property

* remove unused statusbar command

* update to list of map keys

* API Interactions (#55)

* basic API changes working

* clean up implementation

* update icons and names

* error handling

* Add Basic CodeLens functionality (#59)

* add key to flag lens

* stringify values

* remove unused api property

* Code Lens Hover (#53)

* update hover

* updated hover

right click flag toggle poc

* context menu changes

* check for coderefs yaml

* remove duplicate identifier

* fix getMap in flag lens

* fix offlining when not in focus

* Updated tree node UI (#57)

* only update global flag metadata based on refresh rate

treeview gets all info from flagstore

add refresh rate config options

* lint

* remove console

* remove unused imports

disable events

* make event readonly

* make metadata private

remove console logs

* fixes to work for initial install

* remove console

* remove unused property and function

* remove unused function

* remove console log

* named import for lodash

remove commented lines

* remove unneeded window message

change comparison

* fix promises

* remove unused function

* Update src/extension.ts

Co-authored-by: Arnold Trakhtenberg <arnold@launchdarkly.com>

* Update src/extension.ts

Co-authored-by: Arnold Trakhtenberg <arnold@launchdarkly.com>

* fixes

* remove console log

* start cleaning up flagview

move enabled icon to top level

* handle changes in variations

* add basic interface between classes

* lint

* fix off variation

* add context check back

* lint

* add basic test

* fix missing paranthesis

* test fixes

* update enabled icons

* remove variation length property

* update model

* update changelog

* initial code refs

* Alias Treeview

Alias Tree search

* lint

* add config

* remove console log

* Check coderefs version

remove console logs

set timeout on child process

* lint

* remove unused taskDefinition

check coderefs path is set

* lint

* add search ability

add icons for searching aliases

* add list of keys as property

remove unused statusbar command

* update to list of map keys

* rename getter

* basic API changes working

* clean up implementation

* update icons and names

* error handling

* not working

* lens resolving

add configuration option

* show variations served

* handle no default

* codelens on aliases basic support

* eslint ignore

remove console.log

* add key to flag lens

stringify values

* remove console log

* only Stringify object

* fix rebase

* remove unused api property

* update for rebase

* check if keys is defined

* codelens on aliases basic support

* update hover

* updated hover

right click flag toggle poc

* context menu changes

* check for coderefs yaml

rebase cleanup

* fix getKeys when aliases do not exist

* lint

* Updated tree node UI

* Fix for test

* Fix for test

* Updated toggle icons

* New popover UI

Co-authored-by: Dan O'Brien <dobrien@launchdarkly.com>
Co-authored-by: Dan O'Brien <dobrien.nj@gmail.com>
Co-authored-by: Arnold Trakhtenberg <arnold@launchdarkly.com>

* Fix tests

* Prettier updates

* Add GH action to publish to registry

* Change name of publisher

* Updated version and icon

* Change name to LaunchDarkly Beta

* Fix version

* Change ver to 3.0.0

* Coderefs download (#60)

* initial download of code refs

* update config check to run coderefs

* fix aliases section showing in treeview if no aliases

* platform agnostic path for coderefs

* Fix test

* updated dependencies (#61)

* prettier fixes

* eslint and type updates

* more prettier fixes

* Automate version and name change for beta build

* Change version format

* One more to conform to version specs

* Don't create a beta release unless it's on the beta branch

* Only publish on v3 branch

* No need to check branch separately

* Added snapshot testing, resized hover icons

* Fix prettier issue

* Publish beta under launchdarkly-beta id

* Publish to OpenVSX

* s/v3/beta

* Fix prettier

* Color theme is in the wrong case

* ignore coderefs dir

handle high contrast theme

* fix error interpolation

remove codelens array private var

null check on flag variation

* Activation add Ignore for this workspace [ch98567] (#62)

* Activation Add configure buttons to sidebar [ch98569] (#63)

* Activation add Ignore for this workspace [ch98567]

* Activation Add configure buttons to sidebar [ch98569]

* Remove .vscode/settings.json

* check aliases for hover

* move flag search to parent node

* prettier fixes

* Icon color changes, turn off codelens on prod, use yarn for build

* Updated docs

* Change formatting

* move hover provider to own file

implement fix for auto-complete

* update test

* Config Hide advanced config settings like [ch98573] (#64)

There are also a few other things included in this commit: change version # pattern for beta, updated config descriptions, and turn off all other extensions when in debug mode.

* Reverting back to previous versioning scheme

Even though vsce says that it supports semver, it turns out that the Marketplace doesn't support prereleases (microsoft/vscode-vsce#415 (comment))

* Change default name to LaunchDarkly

* do not show error when SDK handles it

Co-authored-by: Dan O'Brien <dobrien.nj@gmail.com>
Co-authored-by: Dan O'Brien <dobrien@launchdarkly.com>
Co-authored-by: Arnold Trakhtenberg <arnold@launchdarkly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants