In some situations, a module may define a type which has a perfectly valid name, but still encounters a naming conflict. The conflict may be with a type defined by a dependency, or with a core type.
The conflict occurs when concat(<MODULE_NAME>, <TYPE_NAME>) is equal to either concat(<OTHER_MOD_NAME>, <OTHER_TYPE_NAME>), or <CORE_TYPE_NAME>.
For example:
If a module Git defines a type Repository, it will conflict with the core type GitRepository
If a module Docker defines a type ComposeProject, it will conflict with a dependency DockerCompose defining a type Project.
Solution
Change mangling of generated types, to avoid these conflicts. For example, add a _ between the module name and type name.
As a result:
Git_Repository will not conflict with the core type GitRepository.
Docker_ComposeProject will not conflict with DockerCompose_Project
Problem
In some situations, a module may define a type which has a perfectly valid name, but still encounters a naming conflict. The conflict may be with a type defined by a dependency, or with a core type.
The conflict occurs when
concat(<MODULE_NAME>, <TYPE_NAME>)
is equal to eitherconcat(<OTHER_MOD_NAME>, <OTHER_TYPE_NAME>)
, or<CORE_TYPE_NAME>
.For example:
Git
defines a typeRepository
, it will conflict with the core typeGitRepository
Docker
defines a typeComposeProject
, it will conflict with a dependencyDockerCompose
defining a typeProject
.Solution
Change mangling of generated types, to avoid these conflicts. For example, add a
_
between the module name and type name.As a result:
Git_Repository
will not conflict with the core typeGitRepository
.Docker_ComposeProject
will not conflict withDockerCompose_Project