-
Notifications
You must be signed in to change notification settings - Fork 298
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
cue: Go API downloads more than necessary for simple use cases #1872
Comments
We can drop pkg/errors once cockroachdb/apd#123 is done. |
apd/v2 version v2.0.1 had its v1 module as a test dependency. That was fixed in v2.0.2, so pull it to trim our graph. For #1872. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I771d542f90a011040941fccdb8c1e65ccf25586e Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/542598 Unity-Result: CUEcueckoo <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
go-cmp, x/tools, and x/mod were all pulling it indirectly. All of them removed it at some point in the last year. Update them so we can drop x/xerrors. No functional change, but our set of dependencies gets slightly lighter. Updates #1872. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Ie19eb3ea19467faca5313dfb038e14da641a8a4f Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/542609 Unity-Result: CUEcueckoo <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Roger Peppe <[email protected]>
This is more accorate than the generic ".txt" extension. The latest testscript version supports this switch, and in fact it now prefers the explicit extension. The update drops errgo.v2 from the module graph, which helps #1872. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I2fc1a108af6cd4544a00d0ffc3f334b5bbd6c720 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/542611 Reviewed-by: Roger Peppe <[email protected]> Unity-Result: CUEcueckoo <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
Upstream apd fixed their reliance on pkg/errors, though they did that in v3, while we are in v2. @mpvl @myitcv would it be OK to upgrade to apd/v3 now? Per https://github.com/cockroachdb/apd/releases/tag/v3.0.0 there's only one breaking change, so it shouldn't be a hard upgrade. We probably also don't want to stay on v2 for too long, as it hasn't seen an update in over two years now. |
I gave it a quick go, and it mostly works, though a few tests are unhappy due to different resulting precision. For example, in master with a bit of debug logging to see the apd.Decimal being marshaled:
and now in my branch:
This seems like a change that we don't want, because we add verbosity for no reason. However I can't tell if it's a bug on our side (perhaps relying on undocumented behavior), or an intentional change in behavior in upstream's v3, which they are allowed to do per semver. I could not find anything in their release changelogs. Worth noting that I think the new I think upstream changed this in cockroachdb/apd#115, as it removes calls to |
I should have clarified that the CL is https://review.gerrithub.io/c/cue-lang/cue/+/543421, and the full results are at https://github.com/cue-lang/cue-trybot/actions/runs/3045646884/jobs/4907455935. |
Right now, a simple example like https://pkg.go.dev/cuelang.org/[email protected]/cue#example-Context downloads quite a lot of modules:
Some of these look unnecessary, like pkg/errors and apd v1. We should trim these down.
The text was updated successfully, but these errors were encountered: