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

Versioning of the Air Code extension #172

Open
DavisVaughan opened this issue Jan 16, 2025 · 2 comments
Open

Versioning of the Air Code extension #172

DavisVaughan opened this issue Jan 16, 2025 · 2 comments

Comments

@DavisVaughan
Copy link
Collaborator

VS Code recommends a super weird versioning strategy if you plan to have release and pre-release versions of your extension
https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions

We only support major.minor.patch for extension versions, semver pre-release tags are not supported. Versions must be different between pre-release and regular releases. That is, if 1.2.3 is uploaded as a pre-release, the next regular release must be uploaded with a distinct version, such as 1.2.4. Full semver support will be available in the future.

VS Code will automatically update extensions to the highest version available, so even if a user opted-into a pre-release version and there is an extension release with a higher version, the user will be updated to the released version. So, we recommend that extensions use major.EVEN_NUMBER.patch for release versions and major.ODD_NUMBER.patch for pre-release versions. For example: 0.2.* for release and 0.3.* for pre-release.

If extension authors do not want their pre-release users to be updated to the release version, we recommend always incrementing and publishing a new pre-release version before publishing a release version to make sure that the pre-release version is always higher. Note that while pre-release users will be updated to a release version if it is higher, they still remain eligible to automatically update to future pre-releases with higher version numbers than the release version.


I think we may consider using a pre-release version if we want to send out an experimental feature? I doubt we'd set up nightly releases because that's probably too easy to break.

Ruff uses a calendar-ish based versioning scheme that seems reasonable:

  • We'd start with 2025.0.0 and every release we bump to the next even minor version, so 2025.2.0
  • Every year we bump the major version, so 2026.0.0 at the start of next year
  • We don't use the patch version at all and just keep it 0 (unless we really need it)
  • In the rare case where we may want a pre-release, we'd release an odd numbered minor version, so 2025.3.0 for example

I don't think the extension version matters that much in terms of semver, that's more important for the executable version, so I vote we just stick with this approach even though it's weird, since it seems to follow vs code recommendations

@lionel-
Copy link
Collaborator

lionel- commented Jan 17, 2025

So the main distinction between pre-release and release versions is that only the latter are published to the marketplace? And that's what prevents users of even versions to be upated automatically to odd versions?

If that's the case I don't understand:

VS Code will automatically update extensions to the highest version available, so even if a user opted-into a pre-release version and there is an extension release with a higher version, the user will be updated to the released version. So, we recommend that extensions use major.EVEN_NUMBER.patch for release versions and major.ODD_NUMBER.patch for pre-release versions. For example: 0.2.* for release and 0.3.* for pre-release.

How does VS Code know not to upgrade 0.1.0 to 0.2.0 if 0.3.0 is not pushed to the marketplace?

That said it seems like it's a good thing that users who installed a pre-release manually automatically get updated to the latest release and don't get stuck with the pre-release.

@DavisVaughan
Copy link
Collaborator Author

Pre-releases are definitely published to the marketplace

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

2 participants