-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue: deprecate
cue somecmd
in favor of cue cmd somecmd
v0.9.0-alpha.1 will be released with the deprecation warning to stderr, and a future release like v0.10 or v0.11 can remove support entirely. Note that even when we remove support for the short form, this shouldn't be a hard breakage for any users, as they can switch to the long form by adding the "cmd" argument. Also rewrite a few tests which didn't need to use the short form. Only one other test case remains with the short form, as it explicitly tests for an edge case bug relating to the short form. That test case can be removed entirely once we drop support. Updates #2519. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I04aa48b048bb3f1c397f8b95a36933d797734930 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1185473 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.io> TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
- Loading branch information
Showing
4 changed files
with
26 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Issue #578 | ||
exec cue dump ./... | ||
exec cue cmd dump ./... | ||
cmp stdout stdout-expect | ||
-- k1.cue -- | ||
package kube | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
exec cue cmd hello | ||
stdout 'Hello world!' | ||
! stderr . | ||
|
||
exec cue hello | ||
stdout 'Hello world!' | ||
cmp stderr stderr-warning | ||
|
||
-- stderr-warning -- | ||
The short-form 'cue hello' is deprecated; use 'cue cmd hello'. | ||
See: https://cuelang.org/issue/2519 | ||
-- task_tool.cue -- | ||
package home | ||
|
||
import "tool/cli" | ||
|
||
command: hello: cli.Print & { | ||
text: "Hello world!" | ||
} |