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: add mod fix #3137

Closed
myitcv opened this issue May 10, 2024 · 0 comments
Closed

cmd/cue: add mod fix #3137

myitcv opened this issue May 10, 2024 · 0 comments
Assignees
Labels
FeatureRequest New feature or request modules Issues related to CUE modules and the experimental implementation

Comments

@myitcv
Copy link
Member

myitcv commented May 10, 2024

We'd like a way for people to easily upgrade a legacy cue.mod/module.cue file to one that is compatible with the new syntax, including a language version.

A cue mod fix command could do this. If the file is already compatible with the new syntax, the command would have no effect. Otherwise it would add a language.version according to the language.version of the running cmd/cue binary.

This mode would also move unknown fields to a custom (bike shed name) field, by definition, as a one-off.

@myitcv myitcv added FeatureRequest New feature or request modules Issues related to CUE modules and the experimental implementation labels May 10, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Release v0.9 May 10, 2024
@myitcv myitcv moved this from Backlog to v0.9.0-rc.1 in Release v0.9 May 10, 2024
@myitcv myitcv moved this from Backlog to Planned in Modules Roadmap May 10, 2024
@myitcv myitcv moved this from Planned to In progress in Modules Roadmap May 10, 2024
@rogpeppe rogpeppe changed the title cmd/cue: add mod edit --fix cmd/cue: add mod fix May 10, 2024
cueckoo pushed a commit that referenced this issue May 15, 2024
This implements the core functionality required
to migrate legacy module.cue files to the new syntax.

For #3137

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: I27cf3e7241d64d56398289c1400d51ef79b0f813
cueckoo pushed a commit that referenced this issue May 15, 2024
This wires up the `modfile.FixLegacy` function to a new
`cue mod fix` command.

Fixes #3137

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: Idbb071493c4596feabf3b2c6c9ee8a53847d6127
cueckoo pushed a commit that referenced this issue May 15, 2024
This implements the core functionality required
to migrate legacy module.cue files to the new syntax.

For #3137

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: I27cf3e7241d64d56398289c1400d51ef79b0f813
cueckoo pushed a commit that referenced this issue May 15, 2024
This wires up the `modfile.FixLegacy` function to a new
`cue mod fix` command.

Fixes #3137

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: Idbb071493c4596feabf3b2c6c9ee8a53847d6127
cueckoo pushed a commit that referenced this issue May 15, 2024
This implements the core functionality required
to migrate legacy module.cue files to the new syntax.

For #3137

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: I27cf3e7241d64d56398289c1400d51ef79b0f813
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194769
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
@github-project-automation github-project-automation bot moved this from In progress to Done in Modules Roadmap May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest New feature or request modules Issues related to CUE modules and the experimental implementation
Projects
Archived in project
Status: v0.9.0-alpha.5
Development

No branches or pull requests

2 participants