Are you able replicate the bug in the latest version of MontiCore.
Describe the bug
Names in the context of symbol builders are weird.
First, full names: Why is there even an option to set the full name of a symbol in the builder? Isn't a full name a lazy loaded derived property? If there is a use case to be able to set the full name via the builder, then I would at least expect some checks:
- The last part of the full name is the name (if present)
- The qualifier of the full name is the package name (if present)
- If the package name is not present, the qualifier of the full name is the qualifier derived from the scope structure
And if neither name nor package name is not present, I expect these to be derived from the full name. Being able to set all and inconsistently is prone to errors.
Furthermore, the package name has similar problems to the full name. Usually, the package name is derived from the scope structure. The package that can be set via the builder is more or less useless but prone to inconsistencies. If you set the name and package for the OOSymbol builder but not the enclosing scope package, the symbol's package is ignored; the full name is just the simple name.
For the package name, I expect similar checks to those defined above for the full name.
Steps to reproduce
How to reproduce inconsistent fullname and package name
OOSymbolsMill.oOTypeSymbolBuilder()
.setPackageName("java.lang")
.setName("Boolean")
.setSpannedScope(MontiArcMill.scope())
.setEnclosingScope(scope)
.build()
How to reproduce inconsistent fullname, name, and package name
OOSymbolsMill.oOTypeSymbolBuilder()
.setPackageName("java.lang")
.setName("Boolean")
.setFullName("non.java.lang.Character")
.setSpannedScope(MontiArcMill.scope())
.setEnclosingScope(scope)
.build()
Expected behaviour
I would expect there to be no option to set the full name. I also would expect there to be at least consistency checks between as defined above.
Minimal reproducible example
No response
Relevant CI workflow/pipeline
No response
Gradle Log
No response
Additional information
No response
Are you able replicate the bug in the latest version of MontiCore.
Describe the bug
Names in the context of symbol builders are weird.
First, full names: Why is there even an option to set the full name of a symbol in the builder? Isn't a full name a lazy loaded derived property? If there is a use case to be able to set the full name via the builder, then I would at least expect some checks:
And if neither name nor package name is not present, I expect these to be derived from the full name. Being able to set all and inconsistently is prone to errors.
Furthermore, the package name has similar problems to the full name. Usually, the package name is derived from the scope structure. The package that can be set via the builder is more or less useless but prone to inconsistencies. If you set the name and package for the OOSymbol builder but not the enclosing scope package, the symbol's package is ignored; the full name is just the simple name.
For the package name, I expect similar checks to those defined above for the full name.
Steps to reproduce
How to reproduce inconsistent fullname and package name
How to reproduce inconsistent fullname, name, and package name
Expected behaviour
I would expect there to be no option to set the full name. I also would expect there to be at least consistency checks between as defined above.
Minimal reproducible example
No response
Relevant CI workflow/pipeline
No response
Gradle Log
No response
Additional information
No response