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
chore(external docs): Make better use of Cue definitions #4493
Conversation
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
@MOZGIII this appears to be the correct way to make the validation stricter. |
Interesting! I don't see how it addressed my concerns with the types for the log output: That code in this branch is the same as before. Is this intended? I wonder what cue maintainers say about the computation time increase. Can they look into our use case and provide a better solution, something that would exclusively allow only a single field? Or does this do it already? |
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
docs/reference.cue
Outdated
@@ -351,16 +353,16 @@ _values: { | |||
relevant_when?: string | |||
required: bool | |||
type: { | |||
"*": {} | |||
"[string]"?: { | |||
{"*": {}} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will end up with a big oops unless closed
. The evaluation will assume all types satisfy the values here, and rightfully so, since they can be expanded to satisfy the value, as they're not closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it works - nevermind :D
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
Signed-off-by: binarylogic <bjohnson@binarylogic.com>
…v#4493) Signed-off-by: Brian Menges <brian.menges@anaplan.com>
As recommended by a Cue maintainer, we should be making judicious use of definitions: