-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue: add failing tests for 'cue get go' transitive deps regression
The following patch will include the fix and change these tests so that they expect to succeed. For #3033. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I0e5bb77e79a0bd1c339d73c9cf2950630f834672 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193698 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Roger Peppe <[email protected]>
- Loading branch information
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
cmd/cue/cmd/testdata/mod/externalmod.test_imports_v1.0.0.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- .mod -- | ||
module externalmod.test/imports | ||
|
||
-- .info -- | ||
{"Version":"v1.0.0","Time":"2018-10-22T18:45:39Z"} | ||
|
||
-- go.mod -- | ||
module externalmod.test/imports | ||
|
||
-- root/p.go -- | ||
package root | ||
|
||
import "externalmod.test/imports/sub1" | ||
|
||
type Type struct { | ||
Sub1 sub1.Type | ||
} | ||
-- sub1/p.go -- | ||
package sub1 | ||
|
||
import "externalmod.test/imports/sub2" | ||
|
||
type Type struct { | ||
Sub2 sub2.Type | ||
} | ||
-- sub2/p.go -- | ||
package sub2 | ||
|
||
type Type struct { | ||
Leaf int | ||
} |
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,6 +1,6 @@ | ||
# Test that cue get go works when used without the --local flag | ||
|
||
# cue get go currently appear to act like a wrapper around go get. | ||
# cue get go currently appears to act like a wrapper around go get. | ||
# But this is going to change: "cue get go" will be renamed "cue import go". | ||
# When that change happens, cue import go will assume that all | ||
# required dependencies are present, and fail otherwise. | ||
|
@@ -15,8 +15,22 @@ cmp cue.mod/gen/externalmod.test/blah/blah_gen.cue cue.mod/gen/externalmod.test/ | |
# Verify dependencies are as expected | ||
cmp go.mod go.mod.golden | ||
|
||
# Verify that all transitive dependencies are generated properly as well. | ||
# If any are missing, the evaluation would fail to load them. | ||
# TODO: broken due to https://cuelang.org/issue/3033. | ||
go get externalmod.test/imports/[email protected] | ||
exec cue get go externalmod.test/imports/root | ||
! exec cue eval uses_imports_root.cue | ||
stderr 'cannot find package "externalmod.test/imports/sub1"' | ||
|
||
-- cue.mod/module.cue -- | ||
module: "mod.test/local" | ||
-- uses_imports_root.cue -- | ||
package p | ||
|
||
import "externalmod.test/imports/root" | ||
|
||
root.Type | ||
|
||
-- go.mod -- | ||
module mod.test/local | ||
|
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