rebus-org / Rebus

:bus: Simple and lean service bus implementation for .NET
https://mookid.dk/category/rebus
Other
2.31k stars 362 forks source link

Rebus nugets references missing Maximum version of Catle.Windsor #906

Closed b2yq closed 4 years ago

b2yq commented 4 years ago

I am working in a project where Rebus libraries are used in versions:

"Rebus" version="3.1.5" "Rebus.Castle.Windsor" version="3.0.0" "Rebus.Jil" version="3.0.0" "Rebus.Msmq" version="3.0.0" "Rebus.NLog" version="3.0.0" "Rebus.RavenDb" version="3.0.0" "Rebus.XmlConfig" version="3.0.0"

all Rebus libraries are marked that are compatible with Castle.Windsor: 3+ but its not true, its compatible only with Castle.Windsor 3<= and <4, because some classes used internally by Rebus has been moved to different namespaces in Castle.Windows (4 or 5). The problem is hard to find out, because all those errors occurs only in runtime, because after updating to Castle.Windsor 5+ build will succeded because Rebus nuget description is wrong.

mookid8000 commented 4 years ago

Ah yes, sorry – you'd probably need to update Rebus.Castle.Windsor to make it work with Windsor 5

b2yq commented 3 years ago

no its not true, simple test is that: Rebus 3 (currently installed with Windsor 3) -> update to Rebus 5 (will update Windsor to 5) -> downgrade to Rebus 3 - won't downgrade Windsor to version 3 and will throw exceptios on runtime, because its not compatible with Windsor 5, so nuget description that its compatible with Windsor 3+ is not true. Updating Rebus.Windsor won't work, because it will upgrade Rebus too

mookid8000 commented 3 years ago

(...) nuget description that its compatible with Windsor 3+ is not true (...)

You are absolutely right. 😐 This is because the Rebus packages (including Rebus.Castle.Windsor) have a history of declaring their NuGet dependencies as >= N instead of putting an upper bound on the allowed version.

In many cases, this has proven to be pretty nice, because the fact that a new major version of a dependency had been released wasn't necessarily a sign that that particular package's changes broke anything Rebus-related.

In your case, you MUST upgrade Rebus.Castle.Windsor to make it work with Castle Windsor 5, and it seems that requires that you upgrade Rebus too.

I'm sorry if it causes inconvenience for you, but it's not possible for me to maintain all of these libraries and always support that e.g. a 3+ years old version of Rebus can be made to work with all later versions of their integration libraries' dependencies.