jayvee
jayvee copied to clipboard
[FEATURE] Rework Name Uniqueness
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
I agree, unique names for everything imho.
https://github.com/jvalue/jayvee/pull/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.