Skip to content

fix(project): name manifests that declare no Go version - #56

Merged
johnny4young merged 1 commit into
mainfrom
fix/project-manifest-errors
Oct 14, 2026
Merged

johnny4young merged 1 commit into
mainfrom
fix/project-manifest-errors

Conversation

@johnny4young

Copy link
Copy Markdown
Owner

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 --print and gos run -- reported a missing manifest:

$ : > .go-version && gos use --print
Error: no .go-version or go.mod found from /path/project upward.

The .tool-versions change in #44 made it contradictory, printing both lines:

Error: /path/.tool-versions: the golang entry has no version.
Error: no .go-version or go.mod found from /path/sub upward.

_gos_resolve_project_version now returns 2 with the offending manifest path on stdout, distinct from 1 (nothing found). The two callers that print the "not found" message report could 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-version and a go.mod without a go directive are named by path for use --print and run --, and the incomplete .tool-versions case no longer prints "found from". The new assertions fail on main.
  • scripts/validate-local.bash passes locally on macOS (shellcheck, shfmt, zsh, fish, pwsh included).

The CHANGELOG also lists the upload-artifact/download-artifact Dependabot bumps (#53, #55) ahead of the release.

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.
@johnny4young
johnny4young merged commit f7b50e3 into main Oct 14, 2026
11 checks passed
@johnny4young
johnny4young deleted the fix/project-manifest-errors branch October 14, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant