Once we enable the tsp namespace feature, we get tons of occurrence of this case:
one of the segment of the namespace collides with one of the existing type name, such as in cadl-ranch case http/client/naming, we have a type Client.Naming.UnionEnum.ClientExtensibleEnum and another client Client.Naming.UnionEnum
Here is a case that one namespace segment collides with a type's name. Spec here: Azure/typespec-azure@111e0b9/packages/azure-http-specs/specs/client/naming/main.tsp#L197
We get this before - but when this happens before, we rename the namespace, see this cadl ranch project:
in this case, the namespace segment collides with BCL type names, therefore we renamed them.
Now the new change uncovers more occurrence of this issue, we need to find a solution to avoid the generated code to fail to compile.
Once we enable the tsp namespace feature, we get tons of occurrence of this case:
one of the segment of the namespace collides with one of the existing type name, such as in cadl-ranch case
http/client/naming, we have a typeClient.Naming.UnionEnum.ClientExtensibleEnumand another clientClient.Naming.UnionEnumHere is a case that one namespace segment collides with a type's name. Spec here: Azure/typespec-azure@111e0b9/packages/azure-http-specs/specs/client/naming/main.tsp#L197
We get this before - but when this happens before, we rename the namespace, see this cadl ranch project:
typespec/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/ArrayClient.cs
Line 8 in 2fd4d33
in this case, the namespace segment collides with BCL type names, therefore we renamed them.
Now the new change uncovers more occurrence of this issue, we need to find a solution to avoid the generated code to fail to compile.