Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cue: attempt to import package from main module fails #3640

Open
myitcv opened this issue Dec 31, 2024 · 0 comments
Open

cmd/cue: attempt to import package from main module fails #3640

myitcv opened this issue Dec 31, 2024 · 0 comments
Labels
modules Issues related to CUE modules and the experimental implementation NeedsInvestigation

Comments

@myitcv
Copy link
Member

myitcv commented Dec 31, 2024

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

$ cue version
cue version v0.0.0-20241230133743-46fc54aa9caf

go version go1.23.2
      -buildmode exe
       -compiler gc
  DefaultGODEBUG asynctimerchan=1,gotypesalias=0,httpservecontentkeepheaders=1,tls3des=1,tlskyber=0,x509keypairleaf=0,x509negativeserial=1
     CGO_ENABLED 1
          GOARCH arm64
            GOOS linux
         GOARM64 v8.0
             vcs git
    vcs.revision 46fc54aa9caf95393dcd3fe0ac066c8112da986d
        vcs.time 2024-12-30T13:37:43Z
    vcs.modified false
cue.lang.version v0.12.0

Does this issue reproduce with the latest release?

Yes and tip.

What did you do?

# export :a in root
exec cue export .:a
cmp stdout $WORK/stdout.a.golden

# export :b in root
exec cue export .:b
cmp stdout $WORK/stdout.b.golden

# cd test
cd test

# export :c in test
exec cue export .:c
cmp stdout $WORK/stdout.c.golden

# export :b in test
exec cue export .:b
cmp stdout $WORK/stdout.b.golden

# export :a in test
exec cue export .:a
cmp stdout $WORK/stdout.a.golden

-- a.cue --
package a

import B "broken.io/x:b"

a:  "a"
bb: "\(B.b)"
-- b.cue --
package b

b: "b"
-- cue.mod/module.cue --
module: "broken.io/x"
language: {
	version: "v0.12.0"
}
-- test/c.cue --
package c

c: "c"
-- stdout.a.golden --
{
    "a": "a",
    "bb": "b"
}
-- stdout.b.golden --
{
    "b": "b"
}
-- stdout.c.golden --
{
    "c": "c"
}

What did you expect to see?

Passing test.

What did you see instead?

# export :a in root (0.014s)
# export :b in root (0.011s)
# cd test (0.000s)
# export :c in test (0.010s)
# export :b in test (0.010s)
# export :a in test (0.011s)
> exec cue export .:a
[stderr]
broken.io/x/test@v0: import failed: no dependency found for package "broken.io/x":
    ../a.cue:3:8
[exit status 1]
FAIL: /tmp/testscript4243465204/repro.txtar/script.txtar:21: unexpected command failure
@myitcv myitcv added NeedsInvestigation modules Issues related to CUE modules and the experimental implementation labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modules Issues related to CUE modules and the experimental implementation NeedsInvestigation
Projects
Status: Backlog
Development

No branches or pull requests

1 participant