-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
fix: build with go 1.23 by tracking modules.txt #168
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it locally and it indeed works with go 1.23.
I checked why the unit test for the cli-args fails and the situation is somewhat complicated.
and so the resulting
This is absolutely correct. If you run
So, how to fix this? I think ultimately we would need to bring the environment that generates the |
I tested this branch, and it seems it broke the
|
8d0a797
to
928f240
Compare
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…
2e06536
to
3668e43
Compare
Fixes: #117
Since go 1.23,
vendor/modules.txt
is required.Hence, this is a first attempt to track
modules.txt
via gomod2nix.Since, unfortunately,
module.txt
employs a bespoke custom format in whichvarying numbers of
#
hold meaning, I deemed it more stable to not reverse-engineer it.Instead, we generate it when running
gomod2nix
by executinggo mod vendor
and tracking its content ingomod2nix.toml
.Not the most elegant solution, but it works and enables us to use gomod2nix with go v1.23.
Any comments appreached…