Replies: 2 comments
-
@seh - sincere apologies for being slow at replying to this (and thank you for raising it as a discussion from Slack in the first place). This looks like a bug to me: injected values can only be concrete. AFAICT, that error comes from the compiler, and if the injection has got that far without being detected as a type error. Hence I've raised: #1010 But in investigating this I stumbled across another issue that looks like a typo/copy paste bad error message, raised as: #1011 |
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#932. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
-
Moving here from the "general" channel in the "CUE" Slack workspace, I have a CUE file with a
@tag
attribute defined like this:If I run cue export file.cue --inject builtat=1, it works as expected.
If I run cue export file.cue --inject builtat=x, it fails with this message:
That sort of makes sense, though I’m not sure what it means by “reference” there. With what is CUE trying to match the string “x”?
Also interesting: If I instead run cue export file.cue --inject ’builtat={x}’, with curly braces around “x,” it fails with the same message, having “unwrapped” the value “{x}“:
Is there some syntax for the right-hand side of that equals sign that CUE is parsing? The documentation in cue injection doesn’t mention anything elaborate.
Beta Was this translation helpful? Give feedback.
All reactions