You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command "cue get go" is like "go get", but converts the retrieved Go packages to CUE.
The documentation leaves it ambiguous whether you can import whole Go modules this way, and whether any kind of pattern syntax is accepted (for example ... as a pattern qualifier). By experiment, it seems that the answer to both those questions is "no", but it would be good to be clear, as the higher level cue get help talks about downloading modules.
Also, the cue get help also implies that CUE modules or packages can be downloaded, but the get command doesn't seem to allow a cue subcommand, so it's not clear how that would work.
The text was updated successfully, but these errors were encountered:
By experiment, it seems that the answer to both those questions is "no"
I think the answer is actually "yes", at least based on my experiment using f0c025c:
exec cue get go go.com/...
exec cue def go.com/b
-- cue.mod/module.cue --
module: "cue.com"
-- go.mod --
module go.com
-- a/a.go --
package a
const Name = "a"
-- b/b.go --
package b
const Name = "b"
Gives:
> exec cue get go go.com/...
> exec cue def go.com/b
[stdout]
package b
#Name: "b"
Per cuelang/cue#621 (comment) and cuelang/cue#646 the current plan is to deprecate cue get go in favour of cue import go, partly because the separation of concerns is cleaner.
So I'm tempted to close this issue and improve the docs as part of cuelang/cue#646. But please shout if you disagree, @rogpeppe or @mpvl
The question of CUE module support is covered by cuelang/cue#337 (and issues that will be created from it)
Originally opened by @rogpeppe in cuelang/cue#117
Currently the
cue get
help says:The documentation leaves it ambiguous whether you can import whole Go modules this way, and whether any kind of pattern syntax is accepted (for example
...
as a pattern qualifier). By experiment, it seems that the answer to both those questions is "no", but it would be good to be clear, as the higher levelcue get
help talks about downloading modules.Also, the
cue get
help also implies that CUE modules or packages can be downloaded, but theget
command doesn't seem to allow acue
subcommand, so it's not clear how that would work.The text was updated successfully, but these errors were encountered: