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: non-mod command does not suggest running 'cue mod fix' on missing language.version #3232

Closed
myitcv opened this issue Jun 14, 2024 · 0 comments
Assignees
Labels
modules Issues related to CUE modules and the experimental implementation NeedsInvestigation

Comments

@myitcv
Copy link
Member

myitcv commented Jun 14, 2024

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

$ cue version
cue version v0.0.0-20240614115342-59e276a47f70

go version go1.22.3
      -buildmode exe
       -compiler gc
  DefaultGODEBUG httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1
     CGO_ENABLED 1
          GOARCH arm64
            GOOS linux
             vcs git
    vcs.revision 59e276a47f706c9aaa21b1c638ae5826ca27d88d
        vcs.time 2024-06-14T11:53:42Z
    vcs.modified false
cue.lang.version v0.10.0

Does this issue reproduce with the latest release?

Yes

What did you do?

# cue mod tidy
! exec cue mod tidy
stderr 'no language version declared in module.cue; run ''cue mod fix'''

# cue export
! exec cue export
stderr 'no language version declared in module.cue; run ''cue mod fix'''

-- cue.mod/module.cue --
module: "mod.example"
-- x.cue --
package x

x: 5

What did you expect to see?

Passing test.

What did you see instead?

# cue mod tidy (0.012s)
# cue export (0.010s)
> ! exec cue export
[stderr]
no language version declared in module.cue
[exit status 1]
> stderr 'no language version declared in module.cue; run ''cue mod fix'''
FAIL: /tmp/testscript803729477/repro.txtar/script.txtar:7: no match for `no language version declared in module.cue; run 'cue mod fix'` found in stderr
@myitcv myitcv added NeedsInvestigation modules Issues related to CUE modules and the experimental implementation labels Jun 14, 2024
@mvdan mvdan self-assigned this Aug 10, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Modules Roadmap Aug 10, 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
Archived in project
Development

No branches or pull requests

2 participants