cue icon indicating copy to clipboard operation
cue copied to clipboard

cmd/cue: add a "relax" command

Open cueckoo opened this issue 4 years ago • 0 comments

Originally opened by @mpvl in https://github.com/cuelang/cue/issues/15

When converting an overlay system to use CUE, "parent" template will often hard code defaults, about which CUE will complain if any instances unify a struct overriding such defaults. As this is likely a common case, it makes sense to add refactor support for this.

The relax command can rewrite parent structs to relax constraints. It is a simple variant of anti-unification as proposed in #7.

In a typical workflow, a user would run relax and then manually verify in the vc diffs which relaxations to keep and which reveal bugs.

cueckoo avatar Jul 03 '21 10:07 cueckoo