-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/cueexperiment: prevent disabling modules experiment
This change deprecates the modules experiment flag, meaning that modules will always be enabled. We do not yet remove the code to deal with disabled modules, meaning that it will be straightforward to revert this change if it turns out to be necessary. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I846ea4cdbe15c871c3cd92d40cbc5b8809b7b67d Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200580 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
- Loading branch information
Showing
9 changed files
with
21 additions
and
70 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
36 changes: 3 additions & 33 deletions
36
cmd/cue/cmd/testdata/script/registry_modules_disabled.txtar
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,35 +1,5 @@ | ||
# When CUE_EXPERIMENT is disabled, the CUE_REGISTRY | ||
# variable is ignored, as are the new fields in module.cue | ||
# When CUE_EXPERIMENT is disabled, we cannot use the cue command. | ||
|
||
env CUE_EXPERIMENT=modules=false | ||
exec cue export . | ||
cmp stdout expect-stdout | ||
|
||
-- expect-stdout -- | ||
"cue.mod/pkg source" | ||
-- main.cue -- | ||
package main | ||
import "example.com/e" | ||
|
||
e.foo | ||
|
||
-- cue.mod/module.cue -- | ||
module: "test.org" | ||
language: version: "v0.9.0" | ||
// This should be ignored. | ||
deps: "example.com/e": v: "v0.0.1" | ||
-- cue.mod/pkg/example.com/e/cue.mod/module.cue -- | ||
module: "example.com/e" | ||
language: version: "v0.8.0" | ||
-- cue.mod/pkg/example.com/e/main.cue -- | ||
package e | ||
foo: "cue.mod/pkg source" | ||
|
||
-- _registry/example.com_e_v0.0.1/cue.mod/module.cue -- | ||
module: "example.com/e@v0" | ||
language: version: "v0.8.0" | ||
|
||
-- _registry/example.com_e_v0.0.1/main.cue -- | ||
package e | ||
|
||
foo: "registry source" | ||
! exec cue export . | ||
stderr 'cannot change default value of deprecated flag "modules"' |
14 changes: 0 additions & 14 deletions
14
cmd/cue/cmd/testdata/script/registry_modules_disabled_warning.txtar
This file was deleted.
Oops, something went wrong.
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