Skip to content

Case sensitivity in .NET namespaces #9

@Kizari

Description

@Kizari

This is perhaps a little obscure, but it came up when I ran the generator on my project due to a typo in one of my namespaces.

I have the namespace MyProject.Core but in one of my files had accidentally declared it as MyProject.COre, which .NET considers a separate namespace. However, rather than generate stubs for each, it took the MyProject.COre namespace, then threw out MyProject.Core presumably because it had determined it already had that namespace in its dataset.

Since .NET namespaces are technically case sensitive and presumably it is therefore valid to have two namespaces with the same name but different casing, there could be an argument that the tool should support that. However, it's obviously not feasible in practice since it appears that Python relies on the folder names, and one can't have two folders with the same name but different casing.

Perhaps the best approach would therefore be to catch this scenario during generation and output a warning to the user to let them know what has happened and that this isn't supported. If this is something you'd like included, I'd be happy to open a PR for it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions