Skip to content

Type name conflicts #6952

Closed
Closed

Description

@shykes

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 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

Activity

  1. added this to the v0.10.x milestone on Mar 27, 2024
  2. locked and limited conversation to collaborators on Mar 24, 2026
  3. converted this issue into a discussion #12332 on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions