-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
registry: support minimum backend versions and adopt packslip #12845
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0cbcf76
registry: support minimum backend versions for hk
jdx 5e87c91
fix(backend): handle registry version boundary edge cases
jdx 76bd64a
chore(ci): test newly published registry releases
jdx bde2621
docs(backend): fix github link capitalization
jdx 58fd48a
docs(backend): use the native hk completion installer
jdx bf0b1d5
fix(ls-remote): normalize resolved prefix aliases
jdx 5ff6c88
fix(test-tool): validate newly published releases immediately
jdx cceb55e
docs(test-tool): regenerate the man page
jdx 7735459
docs(backend): describe automatic packslip completions
jdx 6158299
registry: prefer packslip for released jdx tools
jdx f5e159a
registry: preserve binaries when preferring packslip
jdx ca78325
test(env): pin fnox for the module regression fixture
jdx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # hk started publishing Packslip manifests in 1.58.1. Earlier releases must | ||
| # continue to install through the registry shorthand, using Aqua. | ||
| export MISE_EXPERIMENTAL=0 | ||
| export MISE_MINIMUM_RELEASE_AGE=0 | ||
| export MISE_REGISTRY_FLOATING=0 | ||
|
|
||
| # Registry CI must exercise the newly published preferred backend immediately. | ||
| MISE_MINIMUM_RELEASE_AGE=90d mise test-tool hk | ||
|
|
||
| assert_contains "mise ls-remote hk@1.57" "1.57.0" | ||
| assert_contains "mise ls-remote hk 1.57" "1.57.0" | ||
| assert_contains "mise ls-remote hk@sub-0.1:1.58.1" "1.57.0" | ||
| assert_contains "mise ls-remote hk@prefix:1.57" "1.57.0" | ||
| assert "mise latest hk@1.57" "1.57.0" | ||
| assert "mise latest hk 1.57" "1.57.0" | ||
| assert_not_contains "MISE_BACKENDS_HK=packslip:github.com/jdx/hk mise ls-remote hk@1.57" "1.57" | ||
| assert_fail_contains "MISE_DISABLE_BACKENDS=aqua mise latest hk@1.57" "none of its backends" | ||
|
|
||
| cat >mise.toml <<'TOML' | ||
| [tools] | ||
| hk = ["1.57.0", "1.58.1"] | ||
|
|
||
| [settings] | ||
| lockfile = true | ||
| TOML | ||
| mise install | ||
| assert_contains "mise exec hk@1.57.0 -- hk --version" "hk 1.57.0" | ||
| assert_contains "mise exec hk@1.58.1 -- hk --version" "hk 1.58.1" | ||
| assert_contains "cat mise.lock" 'backend = "aqua:jdx/hk"' | ||
| assert_contains "cat mise.lock" 'backend = "packslip:github.com/jdx/hk"' | ||
| assert_contains "MISE_OFFLINE=1 mise --locked exec hk@1.57.0 -- hk --version" "hk 1.57.0" | ||
| assert_contains "MISE_OFFLINE=1 mise --locked exec hk@1.58.1 -- hk --version" "hk 1.58.1" | ||
| assert_fail_contains "MISE_DISABLE_BACKENDS=aqua mise latest hk@1.57" "none of its backends" | ||
|
|
||
| # Aliases can cross the boundary after their version string is resolved. | ||
| cat >>mise.toml <<'TOML' | ||
| [tool_alias.hk.versions] | ||
| old = "1.57.0" | ||
| old_prefix = "prefix:1.57" | ||
| TOML | ||
| assert_contains "mise exec hk@old -- hk --version" "hk 1.57.0" | ||
| assert "mise latest hk@old" "1.57.0" | ||
| assert_contains "mise ls-remote hk@old" "1.57.0" | ||
| assert_contains "mise ls-remote hk@old_prefix" "1.57.0" | ||
|
|
||
| # Explicit backends remain explicit; no fallback after a verification error. | ||
| assert_fail_contains "mise install --force packslip:github.com/jdx/hk@1.57.0" "no release" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| backends = ["aqua:jdx/hk"] | ||
| backends = [ | ||
| { full = "packslip:github.com/jdx/hk", min_version = "1.58.1" }, | ||
| "aqua:jdx/hk", | ||
| ] | ||
| bins = ["hk"] | ||
| description = "git hook and pre-commit lint manager" | ||
| test = { cmd = "hk --version", expected = "hk {{version}}" } | ||
| version_order = "semver" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| backends = ["aqua:jdx/pitchfork"] | ||
| backends = [ | ||
| { full = "packslip:github.com/jdx/pitchfork", min_version = "2.24.2" }, | ||
| "aqua:jdx/pitchfork", | ||
| ] | ||
|
jdx marked this conversation as resolved.
|
||
| bins = ["pitchfork"] | ||
| description = "Daemons with DX" | ||
| test = { cmd = "pitchfork --version", expected = "pitchfork {{version}}" } | ||
| version_order = "semver" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| backends = [ | ||
| { full = "packslip:github.com/jdx/usage", min_version = "6.7.1" }, | ||
| "aqua:jdx/usage", | ||
| { full = "asdf:mise-plugins/mise-usage", platforms = [ | ||
| "linux", | ||
| "macos", | ||
| ] }, | ||
| "cargo:usage-cli", | ||
| ] | ||
| bins = ["usage"] | ||
| description = "A specification for CLIs" | ||
| test = { cmd = "usage --version", expected = "usage {{version}}" } | ||
| version_order = "semver" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.