Skip to content
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

doc builds fail with Go 1.23 #1280

Open
cyphar opened this issue Feb 27, 2025 · 2 comments
Open

doc builds fail with Go 1.23 #1280

cyphar opened this issue Feb 27, 2025 · 2 comments

Comments

@cyphar
Copy link
Member

cyphar commented Feb 27, 2025

We need to switch to go.mod I believe, as go run .tool/doc-version.go doesn't work anymore without a go.mod:

% make docs
go run ./.tool/version-doc.go > version.md
.tool/version-doc.go:11:2: no required module provides package github.com/opencontainers/runtime-spec/specs-go: go.mod file not found in current directory or any parent directory;
see 'go help modules'
make: *** [Makefile:55: version.md] エラー 1
make docs  0.05s user 0.08s system 131% cpu 0.096 total
@tianon
Copy link
Member

tianon commented Feb 27, 2025

In my testing, module github.com/opencontainers/runtime-spec as the only contents of go.mod is sufficient, so we could alternatively create/ignore that file in the Makefile 🤔

The annoying bit about go.mod here is that our tags/versions have nothing to do with the "stability" or API of our Go code -- they're the version of the spec. So another alternative could be to add go.mod inside specs-go specifically to avoid that, but then we'd need to adjust .tool appropriately too.

@tianon
Copy link
Member

tianon commented Feb 27, 2025

Alternatively, we could replace .tool/version-doc.go with a simple awk, sed, jq, etc across specs-go/version.go 🤷 (it's not exactly a complex file, and what we're extracting from it isn't exactly complex either)

Current successfully generated content:

**Specification Version:** *1.2.1*

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

No branches or pull requests

2 participants