crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.22k stars 1.61k forks source link

Add a snap channel like `previous/stable` #14240

Open jwoertink opened 5 months ago

jwoertink commented 5 months ago

When installing Crystal through snap, it will default to the latest stable version. Snap has an option to specify a "channel" which will install a different version. Currently Crystal only has these channels available:

❯ snap info crystal
name:      crystal
summary:   A language for humans and computers
publisher: Crystal Language (crystal-lang✓)
store-url: https://snapcraft.io/crystal
contact:   crystal@manas.tech
license:   Apache-2.0
description: |
  Crystal is a programming language with the following goals:

  * Have a syntax similar to Ruby (but compatibility with it is not a goal)
  * Statically type-checked but without having to specify the type of variables or method arguments.
  * Be able to call C code by writing bindings to it in Crystal.
  * Have compile-time evaluation and generation of code, to avoid boilerplate code.
  Compile to efficient native code.
snap-id: hJ4PLSdMxJZPNnfQ4SHvcD0yScjupEFo
channels:
  latest/stable:    1.11.1     2024-01-11 (1916) 39MB classic
  latest/candidate: ↑                                 
  latest/beta:      1.11.1     2024-01-11 (1916) 39MB classic
  latest/edge:      1.12.0-dev 2024-01-15 (1920) 39MB classic

There are cases where a new version of Crystal comes out, but there are regressions that require a new patch to be released. During this time, snap doesn't give you a way to rollback. This could also be used for when libraries or applications aren't ready for the changes in the new version. If there was a new channel of previous/stable that was the latest stable release, it would allow users to easily switch to the latest version to try things out, but swap back to the previous release if things go wrong.

Blacksmoke16 commented 5 months ago

Looks like the Snap term this would be a Track: https://snapcraft.io/docs/channels#heading--tracks.

In the meantime I know you can install/update to a specific revision, so maybe could go back to the previous revision of the latest/stable channel/track?