Skip to content
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

language: placeholder for implementation of required fields proposal #2003

Closed
myitcv opened this issue Oct 14, 2022 · 0 comments
Closed

language: placeholder for implementation of required fields proposal #2003

myitcv opened this issue Oct 14, 2022 · 0 comments
Assignees
Labels
pre v1.0 roadmap/language-changes Specific tag for roadmap issue #339

Comments

@myitcv
Copy link
Member

myitcv commented Oct 14, 2022

This umbrella issue exists as a placeholder for the implementation of the required fields proposal.

Note that at the time of creation, this proposal has not been accepted.

If the proposal is not accepted (rejected, closed, etc), then this issue will simply be closed.

If the proposal is accepted, then this issue will be repurposed as an umbrella tracking issue for implementation.

@myitcv myitcv added roadmap/language-changes Specific tag for roadmap issue #339 pre v1.0 labels Oct 14, 2022
cueckoo pushed a commit that referenced this issue Mar 17, 2023
This rewrite includes optional fields as Arcs in a Vertex,
instead of keeping track of them in the StructInfo.
This has the effect of them being evaluated and processed
like any other arc. This, in turn, allows optional fields
to be prepared for comparison, which allows disjunctions
to be evaluated early.

It is also a necessary step for the implementation of
required fields.

Issue #2003

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Id28c39d6d195b97a9d026fe9804796023306e9bc
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/551104
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
cueckoo pushed a commit that referenced this issue Mar 22, 2023
Instead of introducing a new type for Required fields,
we merge all these field types. They are nearly
identical.

Suffix is introduced to simplify debug printing.

Issue #2003

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I44a5864e241e25dca1ec199d49bf2105683e61ca
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/551203
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
Reviewed-by: Aram Hăvărneanu <aram@cue.works>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
cueckoo pushed a commit that referenced this issue Mar 22, 2023
Support Field.Constraint field to define the type of constraint.

Add helper functions to allow setting AST fields
in a backwards compatible way.

This is needed to support the optional field refactoring.

Issue #2003

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I75c430578ce039a87de20f0de21df69bcf32e1e3
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/551204
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pre v1.0 roadmap/language-changes Specific tag for roadmap issue #339
Projects
None yet
Development

No branches or pull requests

2 participants