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

cue trim bug: conjunctions and definitions #1062

Closed
vikstrous2 opened this issue Jun 17, 2021 · 1 comment
Closed

cue trim bug: conjunctions and definitions #1062

vikstrous2 opened this issue Jun 17, 2021 · 1 comment

Comments

@vikstrous2
Copy link

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

$ cue version
cue version v0.4.0 linux/amd64

Does this issue reproduce with the latest release?

yes, also tested with master

What did you do?

#def2: {
	in2: string
}
#def1: {
	in1: string
	out: #def2 & {
		in2: in1
	}
}
a: #def1 & {
    in1: "test"
}

This is as much as I was able to simplify the bug. There might be a bit more it could be simplified though. Inlining #def1 or #def2 seems to "fix" it.

What did you expect to see?

probably no change

What did you see instead?

  {
      #def2: {
        in2: string
      }
      #def1: {
        in1: string
        out: {
                in2: string
        }
      }
      a: {
          in1: "test"
          out: {
-             in2: "test"
+             in2: string
          }
      }
  }
Aborting trim, output differs after trimming. This is a bug! Use -i to force trim.
You can file a bug here: https://github.com/cuelang/cue/issues/new?assignees=&labels=NeedsInvestigation&template=bug_report.md&title=
@cueckoo
Copy link

cueckoo commented Jul 3, 2021

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

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

@cueckoo cueckoo closed this as completed Jul 3, 2021
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

2 participants