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

globs: connection creating node when it shouldn't #1712

Closed
alixander opened this issue Nov 8, 2023 · 2 comments · Fixed by #1713
Closed

globs: connection creating node when it shouldn't #1712

alixander opened this issue Nov 8, 2023 · 2 comments · Fixed by #1713
Assignees

Comments

@alixander
Copy link
Collaborator

This shouldn't have created new nodes

*.*a -> *.*b

container_1: {
  a
}

container_2: {
  b
}

Screen Shot 2023-11-08 at 9 08 43 AM

@cyborg-ts cyborg-ts added this to D2 Nov 8, 2023
@alixander alixander self-assigned this Nov 8, 2023
@alixander
Copy link
Collaborator Author

Likely the scope in a field creation is wrong.

@alixander
Copy link
Collaborator Author

New theory: the way edge creation from globs works is on each field creation, edge globs are lazily evaluated for each existing field. The moment container_2.b gets declared, the glob looks at it, sees that an edge matches both src and dst, and applies the glob. An edge is created in that very scope with the glob.

It should not do that. It should go to the parent scope and apply it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant