-
Notifications
You must be signed in to change notification settings - Fork 292
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
cue: references to ancestor nodes should be direct and not through outer scope #152
Comments
Original reply by @mpvl in cuelang/cue#152 (comment) Or maybe the way it is now is actually correct. Depending on how a references is interpreted, a reference to root should bind to the copy or not, but it should probably be consistent. |
Original reply by @rudolph9 in cuelang/cue#152 (comment)
@mpvl Agreed, either case is probably valid but needs to be consistent. In either case, it should probably factor into the discussion around the |
Original reply by @rudolph9 in cuelang/cue#152 (comment) Relevant comment to this this issue here |
Original reply by @mpvl in cuelang/cue#152 (comment) I'm pretty convinced the current behavior is correct now. It is just unfortunate there is this dichotomy. Field aliases mitigate it a bit, as one can alias a possibly shadowed variable. I think it will be possible to detect when users make a mistake and then warn them in a vet command, similar to what Go does. |
Original reply by @mpvl in cuelang/cue#152 (comment) Closing for now. |
There's a nested <pre> here and I don't understand the generation logic of it. I'm changing these code blocks into markdown-style backtick blocks and converting tabs to spaces to see if that fixes it.
Originally opened by @mpvl in cuelang/cue#152
If a struct is referred to (and copied), any reference within this copy to the root of the struct should resolve to the root of the copied struct.
Both these cases below should work.
See also Issue #145
The text was updated successfully, but these errors were encountered: