You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
Similar to the previous issues I've opened, this time it's for that is having trouble with cycles:
X: Y.message
STATE: {
for k, v in Y {
if k != "message" {
"\(k)": v
}
}
}
Y: STATE & {
message: X
}
This is a simple stateful bidirectional projection expressed in CUE (STATE is saved and restored as needed). In one way, Y is forked into X and STATE. In the other way, X and STATE are joined into Y. Two usage examples are:
X: "test"
STATE: {
code: 101
}
and
Y: {
message: "test"
code: 101
}
Both of which errors out with a cycle error. Even defining X, STATE, and Y all at the same time causes a cycle error.
The text was updated successfully, but these errors were encountered:
Analogous to reference cycles, we allow comprehensions
to use the struct in which they are defined as source,
as long as they do not introduce new fields, which would
alter the source on which they iterate.
Fixescuelang#779
Fixes #1934
Fixes #1881
Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: Id349de7738567d86bda3cbb137d5ad84aef5b551
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/544129
Reviewed-by: Roger Peppe <[email protected]>
Unity-Result: CUEcueckoo <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current master (2c86835)
Similar to the previous issues I've opened, this time it's
for
that is having trouble with cycles:This is a simple stateful bidirectional projection expressed in CUE (
STATE
is saved and restored as needed). In one way,Y
is forked intoX
andSTATE
. In the other way,X
andSTATE
are joined intoY
. Two usage examples are:and
Both of which errors out with a cycle error. Even defining
X
,STATE
, andY
all at the same time causes a cycle error.The text was updated successfully, but these errors were encountered: