Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/e2e: partially revert using
cue mod init modpath@version
Up to this point, the deployed registry.cue.works used a relatively old version of cmd/cue to do its "published module is tidy" checks. Last week, I bumped this to a v0.8.0 alpha, to keep things up to date and gearing up for the registry being publicly used. One side effect of this is that the newer cmd/cue used in `cue mod tidy` by the registry now adds `language: version: "v0.8.0-alpha.3"` to cue.mod/module.cue if it doesn't exist. So any CUE modules being published without a `language.version` field get rejected with the error "module is not tidy". This breaks the e2e tests as they `go install cuelang.org/go/cmd/cue` from the very same repository via a replace directive, so the version ends up being derived from the buildvcs info, which does not include a tag/semver as seen by `cue version`. Then, the `cue mod init` calls in the e2e tests omit `language.version`. As a fix, go back to templating cue.mod/module.cue in the e2e tests, which allows us to insert language.version manually. At a later time, we can support programmatically adding the field via a command mirroring Go's own `go mod edit`, so add a TODO as well. Note that the "publish to gcloud" e2e test is unaffected, as it performs no such module tidiness checks. This partially reverts https://cuelang.org/cl/1176190. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I2bd4c03a158a64fc5a844af9de9547a3eda6b736 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1177599 Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information