-
Notifications
You must be signed in to change notification settings - Fork 299
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
"cycle error" regression with let fields between 0.4.3 and 0.5.0 #2355
Comments
Bisected to https://review.gerrithub.io/c/cue-lang/cue/+/543362, although that commit first broke this code with a slightly different error:
|
Not just #Build: {
steps: [#Step, ...#Step]
output: #Image
_dag: {
for idx, step in steps if idx == 0 {
"\(idx)": step
}
for idx, step in steps if idx > 0 {
"\(idx)": {
// here throw cyclic task dependency in cueflow
// it works well with v0.4.3 and v0.5.0-beta.1
_prev: _dag["\(idx-1)"].output
step & {
input: _prev
}
}
}
}
if len(_dag) > 0 {
output: _dag["\(len(_dag)-1)"].output
}
}
#Step: {
input?: #Image
output: #Image
...
} |
@morlay could you please raise a new bug following the bug report template? That will include enough information for us to reproduce your problem and be able investigate it. What you shared here isn't enough, and on a first look, the lack of |
@myitcv Sorry. I have to add new config Since |
Before it was assumed that addList would always be called in a final stage. However, this is not true if it is called as a composite literal in an expression, for intsance `[ expr ][0]`. Passing this will allow the computation of embeddings to be defered in a future CL. Issue #2244 Issue #2351 Issue #2355 Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com> Change-Id: I6d27495d8a9413033ad202fc995e297da66e9309 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/556544 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Issue #2351 Issue #2355 Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com> Change-Id: I82afbcc4ebba79e3931fc9dde53c231d77264dd1 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/556919 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
@myitcv just let you know. Since I upgrade to |
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes; tested with v0.5.0 and master per the version output above.
What did you do?
What did you expect to see?
Same output as
v0.4.3
:What did you see instead?
This bug is very similar to #2351; it's entirely possible that both will be fixed with the same commit. However, that other bug was replacing one error with a slightly less helpful error, whereas this bug is turning a successful export into an error. I also think the cycle isn't valid; just like with #2351, embedding a struct shouldn't break let definitions.
Thanks to @massive for reporting this bug and helping investigate it.
The text was updated successfully, but these errors were encountered: