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

Refactor Name Uniquenes #572

Open
georg-schwarz opened this issue May 27, 2024 · 2 comments
Open

Refactor Name Uniquenes #572

georg-schwarz opened this issue May 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@georg-schwarz
Copy link
Member

Right now, we ensure that elements of the same type (blocks, pipelines, etc.) have unique names. However, with exports, it might make sense to ensure unique names across different types of elements.

Any thoughts? @rhazn @joluj

@georg-schwarz georg-schwarz added the enhancement New feature or request label May 27, 2024
@rhazn
Copy link
Contributor

rhazn commented May 27, 2024

I agree, unique names for everything imho.

@georg-schwarz
Copy link
Member Author

#576 introduced the following scheme:

  • Elements with the same name (independent of their type, like blocktype, transform, ...) on the file-level are not allowed
  • Elements with the same name (independent of their type, like blocktype, transform, ...) within a pipeline are not allowed
  • Name collisions of elements within a pipeline with ones on file-level are allowed: reference is "overwritten" (takes the one in current scope)
  • Name collisions of elements anywhere with builtin ones (are automatically made available in every file) are allowed: reference is "overwritten" (takes the one in current scope)

@rhazn raised the question on why not making element names unique across all levels, so no "overwrite" behavior at all. IMO this is possible as we don't have variables (yet) whose names could be reused on different scope levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants