You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you now setup an architecture for both assemblies and check that Classes must not end with '1' only one Class is found.
For reproduction i've added a little sample ArchUnitSample.zip
that is a very interesting set-up. I'd expect that this might not only confuse ArchUnit, but also the developers? Since we identify classes by their namespace/name/generics constellation this is not a real surprise. Let's see if we can easily improve on that.
C# does provide … .GetType().AssemblyQualifiedName which would return e.g. Assembly.FeatureA.Class1, Assembly.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The first step here would be to change the Loader to use the AssemblyQualifiedName instead of just the FullName. I will have another look into this later today.
After that we could also expose the AssemblyQualifiedName in the interface. This would involve new methods for the fluent API and changes to the error messages. But this will definitely take some more time.
Activity
fgather commentedon Sep 3, 2024
Hi @SamuelMuellerKMS,
that is a very interesting set-up. I'd expect that this might not only confuse ArchUnit, but also the developers? Since we identify classes by their namespace/name/generics constellation this is not a real surprise. Let's see if we can easily improve on that.
alexanderlinne commentedon Sep 3, 2024
C# does provide
… .GetType().AssemblyQualifiedNamewhich would return e.g.Assembly.FeatureA.Class1, Assembly.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The first step here would be to change the Loader to use the AssemblyQualifiedName instead of just the FullName. I will have another look into this later today.After that we could also expose the AssemblyQualifiedName in the interface. This would involve new methods for the fluent API and changes to the error messages. But this will definitely take some more time.
fgather commentedon Sep 4, 2024
@SamuelMuellerKMS we just merged a fix for this into main. Would you be able to test it and give feedback?
SamuelMuellerKMS commentedon Sep 5, 2024
I've tested your changes and everything works as expected now.
thx for the fast fix!