-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambiguous reference in projects that have transitive dependencies on both MassTransit.Abstractions and NewId #22
Comments
This was intentional to prevent two separate packages using the same algorithm from generating the same identifiers. While I can understand the transitive package issue, a better option might be an empty NewId package – but I don't think that would work either. |
Yeah, sorry. I did not mean to be prescriptive about a solution. That was just the first one that came to mind. |
Right, I get it. Eliminating the old package from your dependency chain would be the best course of action. |
Fantastic ID generator you guys have made here! Sorry if I'm being ignorant here, but wouldn't it be much easier to just keep it in it's own separate namespace, like "NewId" or..? |
Long story, but NewId was originally in MassTransit, later it was moved out to use it in other projects but the namespace remained the same to avoid breaking compatibility/builds. Now it's back in MassTransit.Abstractions (no namespace change required). The problem with pushing a new v4 with the NewId namespace would be the duplication of the logic in the same process (people will screw up, they do it all the time and end up using both) resulting in duplicate Guids. OH, and the whole static class with the same name as the namespace nonsense. |
In projects that have dependencies on both MassTransit.Abstractions and NewId, the compiler has no way to tell the difference between usages because the class names and namespaces are identical.
@phatboyg have you considered making a breaking change and choosing a new namespace for this standalone library/package?
Edit: I'm aware that having both dependencies is a no-no if you can avoid it, but given that they could be transitive dependencies via NuGet, there are scenarios for which it cannot easily be avoided.
The text was updated successfully, but these errors were encountered: