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

temporary gomod2nix compatability with go 1.23 #1

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

vlinkz
Copy link

@vlinkz vlinkz commented Dec 3, 2024

Temporary fix for gomod2nix with go 1.23 until upstream patch is finished: nix-community#168

obreitwi and others added 3 commits November 25, 2024 15:27
Fixes: nix-community#117

Since go 1.23, `vendor/modules.txt` is [required](golang/go@38ee0c7#diff-61fb6e44eac25bd4d6a8a64b3f38ee8a41faaefd1ef481170a011ecfc0f7c76bR344).

Hence, this is a first attempt to track `modules.txt` via gomod2nix.

Since, unfortunately, `module.txt` employs a bespoke custom format in
which
[varying](https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/cmd/go/internal/modload/vendor.go;l=57)
[numbers](https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/cmd/go/internal/modload/vendor.go;l=103)
of `#` hold meaning I deemed it more stable to not reverse engineer it.

Instead, we generate it when running `gomod2nix` by executing `go mod
vendor` and tracking its content in `gomod2nix.toml`.

Not the most elegant solution, but it works and enables us to use
gomod2nix with go v1.23.

Any comments appreached…
@vlinkz vlinkz requested a review from cbrewster December 3, 2024 18:26
@vlinkz vlinkz changed the title temporary gomod2nix compatability with go 1.23 #179 temporary gomod2nix compatability with go 1.23 Dec 3, 2024
@vlinkz vlinkz merged commit 9a5ed6d into master Dec 3, 2024
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.

3 participants