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

Semantic Versioning updates of environments #3786

Open
jjerphan opened this issue Jan 30, 2025 · 2 comments
Open

Semantic Versioning updates of environments #3786

jjerphan opened this issue Jan 30, 2025 · 2 comments
Labels
type::feature-request New feature proposal

Comments

@jjerphan
Copy link
Member

jjerphan commented Jan 30, 2025

Feature request specification

Currently, it is possible for mamba to update an entire environment with:

mamba env update -n env_name [--all] [--prune] 

As most package are relying on Semantic Versioning (AKA SemVer), being able to perform updates of packages following this scheme would be useful.

Update of versions following this semantic (namely updates for major, minor, patch, and even build) could be integrated in the env update command so that one could update a set of package easily.

Proposed UX: new flags for each SemVer segment

Each segment of Semantic Versioning (e.g. major, minor, patch, build) could have a new flag to update the set of package accordingly:

# Update all the packages in `env_name` for their last major version
mamba env update -n env_name --major

# Update all the package in `env_name` for their last minor version
mamba env update -n env_name --minor

# Update all the package in `env_name` for their last patch version
mamba env update -n env_name --patch

# Update all the package in `env_name` for the last build of the current version
mamba env update -n env_name --build

Those commands must be composable with the existing flags and arguments, such as --all, --prune, or explicitly specified MatchSpec.

For instance, all the following must work:

mamba env update -n env_name --all
mamba env update -n env_name --major --all
mamba env update -n env_name --minor
mamba env update -n env_name --patch --prune
mamba env update -n env_name --build xtensor    

Per-requisites

A few issues might need to be performed first, such as:

  • Determining the difference between update and env update.
  • Adapting the behavior of --prune
  • Adapting the behavior of --all

See related issues:

@jjerphan jjerphan added the type::feature-request New feature proposal label Jan 30, 2025
@SylvainCorlay
Copy link
Member

Thank you for opening the RFC. I think this looks great.

One thing that may be useful would be to allow some packages to advertise a different semantics for their versioning. For example, I presume that Python could consider minor version bump (3.11 vs 3.12) as backward incompatible in this system.

@jjerphan
Copy link
Member Author

Yes, there are several packages that only apparently use Semantic Versioning, but which do not effectively. We must find a way to find the ones which do and the ones which do not, and handle them appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature-request New feature proposal
Projects
None yet
Development

No branches or pull requests

2 participants