Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/backend/go.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ impl Backend for GoBackend {
Ok(vec!["go"])
}

fn supports_lockfile_url(&self) -> bool {
false
}
Comment on lines +37 to +39
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.

P2 No regression test for locked mode

The fix is correct, but there's no new e2e test covering mise install --locked with a go-backend tool. The existing lockfile tests (e.g. e2e/lockfile/test_lockfile_install, e2e/lockfile/test_lockfile_locked_mode) don't exercise this code path for the go backend. Without a test, a future refactor that accidentally reverts this override or changes how supports_lockfile_url() is wired would silently re-introduce the regression.

Consider adding a small test under e2e/lockfile/ — something like:

#!/usr/bin/env bash
export MISE_LOCKFILE=1

cat <<EOF >mise.toml
[tools]
"go:golang.org/x/tools/cmd/goimports" = "latest"
EOF

# mise lock should succeed and produce an entry without a URL
mise lock
assert_contains "mise.lock" 'backend = "go"'

# mise install --locked should succeed (not bail with "No lockfile URL found")
mise install --locked


async fn _list_remote_versions(&self, config: &Arc<Config>) -> eyre::Result<Vec<VersionInfo>> {
// Check if go is available
self.warn_if_dependency_missing(
Expand Down
Loading