-
-
Notifications
You must be signed in to change notification settings - Fork 318
Closed
Labels
Description
Description
A constant defined with the !constant keyword can be overridden, hence is not constants anymore.
This is quite error prone since it allows to easily redefine a constant value in another file (while using includes).
If it is expected behavior, it would probably be interesting to be able to parametrize it to make it stricter (I did not find a way to do it)
Steps to reproduce
- Render the snippet in https://structurizr.com/dsl
workspace {
!constant MICHEL "michel"
!constant MICHEL "mimich"
model {
user = person ${MICHEL}
softwareSystem = softwareSystem "Software System" {
webapp = container "Web Application" {
user -> this "Uses"
}
container "Database" {
webapp -> this "Reads from and writes to"
}
}
}
views {
systemContext softwareSystem {
include *
autolayout lr
}
}
}
- The second value of the constant MICHEL overrides the first one without issue.
Screenshot
No response
Code sample
No response
Configuration
No response
Severity
Minor
Priority
I have no budget and there's no rush, please fix this for free
More information
No response
Reactions are currently unavailable