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

build from source is not working with go1.19, go.mod & docu needs update #11864

Closed
gen2thomas opened this issue Jan 6, 2024 · 5 comments
Closed

Comments

@gen2thomas
Copy link

gen2thomas commented Jan 6, 2024

What version of Hugo are you using (hugo version)?

Try to build the latest version (0.121.2), made with go 1.21.5.

Does this issue reproduce with the latest release?

yes

go Version

go version
go version go1.19.13 linux/amd64

Description

run build for installation according to documentation:

"Install Go version 1.19 or later"

CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
# github.com/getkin/kin-openapi/openapi3
/home/user/go/pkg/mod/github.com/getkin/[email protected]/openapi3/schema_pattern.go:27:32: compiledPatterns.CompareAndSwap undefined (type sync.Map has no field or method CompareAndSwap)
note: module requires Go 1.20

Since go 1.21 the go version directive should (citation):

  • The go line declares a required minimum version of Go to use with this module.
  • The go line must be greater than or equal to the go line of all dependencies.
  • The go command no longer attempts to maintain compatibility with the previous older version of Go.
  • The go command is more careful about keeping checksums of go.mod files in the go.sum file.

I will try to prepare a PR to fix this in go.mod and also for the documentation site afterwards.

@gen2thomas
Copy link
Author

I thought the changes for documentation are trivial, but there are many findings for "go 1.19" and additionally an issue for Changes required for v0.122.0 already exist.

@jmooring , how should I proceed?

@jmooring
Copy link
Member

jmooring commented Jan 6, 2024

Yeah, this changed with f31375d, where we bumped getkin/kin-openapi from 0.118.0 to 0.120.0 (see getkin/kin-openapi#836 for details).

I've updated the documentation site (gohugoio/hugoDocs#2387) and the README in this repository.

@jmooring jmooring closed this as completed Jan 6, 2024
@gen2thomas
Copy link
Author

@jmooring thanks for your fast response and fix for the docu part. But the go.mod part is still open. I like to prepare a PR and link this issue. So please can you re-open the issue.

Maybe it was my fault to add an issue for 2 different parts - sorry for that.

@cmahnke
Copy link

cmahnke commented Feb 8, 2024

Ist this still relevant with #11865 being closed and #12012 being merged?

@jmooring jmooring closed this as completed Feb 8, 2024
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants