JetBrains / JetBrains/resharper-unity
Assembly definition root namespace behaviour
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
Setting the asmdef root namespace doesn't exclude parent directories from namespace providers. So, it just sets a new namespace prefix.
As I remember, it should replace all parent directories. At least that behaviour is described in the source code [comment](https://github.com/JetBrains/resharper-unity/blob/18fdcd7ad4a8fbe1d868fcade5222921d0c4e89e/resharper/resharper-unity/src/Unity/Core/Daemon/NamespaceProviderProjectSettingsProvider.cs#L40) and I believe it used to work this way.
My environment:
- Unity 2023.1.19f1
- Unity package `com.unity.ide.rider` 3.0.26
- JetBrains Rider 2023.2.2 (#RD-232.9921.83)
Contributor guide
Research direction
Start with reshaper/resharper-unity/src/Unity/Core/Daemon/NamespaceProviderProjectSettingsProvider.cs and its root-namespace comment. Reproduce the behavior with Unity 2023.1.19f1 and an asmdef whose root namespace is set, then trace how parent directories contribute namespace providers. Done means the configured root namespace replaces those parent-directory contributions, matching the documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- devtools, game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100