Open yujunz opened 2 years ago
A simplified case to reproduce similar issue.
❯ cat <<HERE >foo.cue
package foo
base: helm: values: cacert: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
base: #HelmRelease
#HelmRelease: {
helm: {
#WithHelmUtils
values: {...}
}
}
#HelmUtils: {
cacert?: string | *"/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
#WithHelmUtils: {
values: {
utils
...
}
utils: #HelmUtils
}
HERE
❯ cue trim
{
base: {
helm: {
values: {
- cacert: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
utils: {
- cacert?: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
}
}
#HelmRelease: {
helm: {
values: {
- cacert?: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
utils: {
- cacert?: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
}
}
#HelmUtils: {
- cacert?: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
#WithHelmUtils: {
values: {
- cacert?: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
utils: {
- cacert?: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
}
}
}
Aborting trim, output differs after trimming. This is a bug! Use -i to force trim.
You can file a bug here: https://cuelang.org/issues/new?assignees=&labels=NeedsInvestigation&template=bug_report.md&title=
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
cue files trimmed
What did you see instead?