This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue: only ignore type and parse errors with get go
Unknown or list-related errors should always be reported back to the user. Otherwise, it's totally unclear what has gone wrong. Change-Id: I9241acb100818dc051f852c98df0f94fb6e68c2b Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8961 Reviewed-by: Marcel van Lohuizen <mpvl@google.com>
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 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
14 changes: 14 additions & 0 deletions
14
cmd/cue/cmd/testdata/script/get_go_unresolvable_package.txt
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,14 @@ | ||
# Test that we get expected error when we ask cue get go to get | ||
# a Go package that cannot be resolved. | ||
|
||
# Ensure that we don't automatically add the missing dependency pre Go 1.16 | ||
[!go1.16] env GOFLAGS=-mod=readonly | ||
|
||
! cue get go k8s.io/api/apps/v1 | ||
[go1.16] stderr '\Qno required module provides package k8s.io/api/apps/v1' | ||
[go1.14] [!go1.16] stderr '\Qcannot find module providing package k8s.io/api/apps/v1: import lookup disabled by -mod=readonly' | ||
|
||
-- go.mod -- | ||
module mod.com/blah | ||
|
||
go 1.14 |