Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Unexported values in tools #924

Closed
verytable opened this issue Apr 27, 2021 · 2 comments
Closed

Unexported values in tools #924

verytable opened this issue Apr 27, 2021 · 2 comments

Comments

@verytable
Copy link

What version of CUE are you using (cue version)?

$ cue version
cue version v0.3.2 linux/amd64

Does this issue reproduce with the latest release?

What did you do?

➜ cat ca.cue 
package abc

_name: "cue"

➜ cat load_tool.cue 
package abc

import (
        "tool/exec"
)

command: hello: {
        print: exec.Run & {
                cmd: "echo Hello \(_name)!"
        }
}
➜ cue hello .

What did you expect to see?

Hello cue!

Did the behavior change in the 0.3.2 version? Everything works as expected in 0.2.2.

What did you see instead?

command.hello.print.cmd: reference "_name" not found:
    ./load_tool.cue:9:36
@verytable verytable changed the title Unexproted values in tools Unexported values in tools Apr 27, 2021
@mpvl
Copy link
Contributor

mpvl commented Apr 28, 2021

Hidden fields were not correctly implemented in v0.2.2: they essentially did not respect the package scoping rules defined in the spec. This was fixed in v0.3.0.

Now, the confusing part is here that commands are defined in the same package, but are actually implemented as different packages. It seems reasonable to fix this.

@mpvl mpvl added the NeedsFix label Apr 28, 2021
cueckoo pushed a commit that referenced this issue Apr 28, 2021
Bug only manifested in combination with modules.

Fixes #924

Change-Id: I8bdfd4975e065e4fa2fbc967fcc8f06b31f82d49
@cueckoo
Copy link

cueckoo commented Jul 3, 2021

This issue has been migrated to cue-lang/cue#924.

For more details about CUE's migration to a new home, please see cue-lang/cue#1078.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants