Repository navigation
fix(project): name manifests that declare no Go version - #56
Merged
Merged
Conversation
An empty .go-version, a go.mod without a go directive, or an incomplete .tool-versions Go entry made use, use --print and run -- claim that no .go-version or go.mod was found. The resolver now returns 2 with the offending manifest so callers report it by path.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Found while validating the PRs merged since v1.11.0. When the nearest project manifest exists but declares no usable Go version,
gos use,gos use --printandgos run --reported a missing manifest:The
.tool-versionschange in #44 made it contradictory, printing both lines:_gos_resolve_project_versionnow returns2with the offending manifest path on stdout, distinct from1(nothing found). The two callers that print the "not found" message reportcould not read a Go version from <manifest>.instead. Read-only callers (status,__project-version, the brief status) already discard failures and are unaffected.Tests
tests/project-env.bash: an empty.go-versionand ago.modwithout agodirective are named by path foruse --printandrun --, and the incomplete.tool-versionscase no longer prints "found from". The new assertions fail onmain.scripts/validate-local.bashpasses locally on macOS (shellcheck, shfmt, zsh, fish, pwsh included).The CHANGELOG also lists the
upload-artifact/download-artifactDependabot bumps (#53, #55) ahead of the release.