Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Don't install unstable versions by default#21

Merged
gridbugs merged 1 commit intoocaml-dune:mainfrom
gridbugs:avoid-unstable-versions-by-default
Aug 18, 2025
Merged

Don't install unstable versions by default#21
gridbugs merged 1 commit intoocaml-dune:mainfrom
gridbugs:avoid-unstable-versions-by-default

Conversation

@gridbugs
Copy link
Copy Markdown
Contributor

@gridbugs gridbugs commented Aug 15, 2025

When the install is run with no arguments it will install the latest version of dune with a binary release. Prior to this change this included unstable versions of dune such as 3.20.0_alpha4. This changes the default behaviour to only consider versions whose version numbers look stable and introduces a flag to allow unstable versions to be considered also.

Also adds some additional options to make it possible to test this change on a fictional set of released versions of dune as at the time of writing there is only one stable and one unstable version released.

@gridbugs gridbugs requested a review from Sudha247 August 15, 2025 03:43
@gridbugs gridbugs force-pushed the avoid-unstable-versions-by-default branch 2 times, most recently from 1e10eb4 to f2bdc9a Compare August 15, 2025 03:46
install.sh Outdated
echo
elif [ "$allow_unstable" = "1" ]; then
echo
error "--allow-unstable has no impact when version number is explicitly specified"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused by this -- does it mean if I want to install an older unstable version, I just need to specify it in the version and don't need the --allow-unstable flag?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't pass the install script a version number then it will install the latest version of dune. This flag allows the installer to consider unstable versions of dune when choosing the latest version. If you want to install an specific unstable version of dune you can always do so by passing that version to the script explicitly though. Perhaps we should just prevent the script from automatically choosing an unstable version altogether rather than providing that behaviour behind a flag. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated this PR to not have an --allow-unstable flag, and instead just always choose the the latest stable version when the version number is omitted.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me! Should we document somewhere that a user needs to explicitly specify the version if they want to install an unstable version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some info to the usage string.

@gridbugs gridbugs force-pushed the avoid-unstable-versions-by-default branch 2 times, most recently from e57acea to 31d4df6 Compare August 18, 2025 01:57
When the install is run with no arguments it will install the latest
version of dune with a binary release. Prior to this change this
included unstable versions of dune such as 3.20.0_alpha4. This changes
the behaviour to only consider versions whose version numbers
look stable.

Also adds some additional options to make it possible to test this
change on a fictional set of released versions of dune as at the time of
writing there is only one stable and one unstable version released.

Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
@gridbugs gridbugs force-pushed the avoid-unstable-versions-by-default branch from 31d4df6 to 4e211e0 Compare August 18, 2025 11:57
@gridbugs gridbugs merged commit d9c74dc into ocaml-dune:main Aug 18, 2025
7 checks passed
@gridbugs gridbugs deleted the avoid-unstable-versions-by-default branch August 18, 2025 12:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants