dagger / dagger

An engine to run your pipelines in containers
https://dagger.io
Apache License 2.0
11.28k stars 604 forks source link

Type name conflicts #6952

Open shykes opened 6 months ago

shykes commented 6 months ago

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:

Solution

Change mangling of generated types, to avoid these conflicts. For example, add a _ between the module name and type name.

As a result:

jedevc commented 6 months ago

Linking: