-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue: suggest
cue mod fix
when language.version
is missing
That is, if a user tries to use `mod tidy`, `mod get`, or `mod publish` on a module without a `language.version` field, which is now mandatory, suggest what the user should run to resolve that issue. Note that we don't apply this change to non-mod commands such as `cue export` because, as the TODOs explain, those scenarios should work for the sake of backwards compatibility as a downstream user. We also don't try to make this be consistent for all `cue mod` commands as it's not clear that all of them should require `language.version`. For example, `mod init` creates a module, `mod fix` can add the field, and we should arguably teach `mod edit` to add or set the field too. For now, add the suggestion to the three `cue mod` commands which are most likely to be used when developing or publishing a CUE module. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I11cef96900b2a5984ad6c07abbd705108c2c2759 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195784 Reviewed-by: Paul Jolly <paul@myitcv.io> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
- Loading branch information
Showing
7 changed files
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters