zompinc / sync-method-generator

Generates a synchronized version of an async method
MIT License
48 stars 4 forks source link

FYI: bumping codeanalysis nuget version brings problems. #58

Closed lsoft closed 6 months ago

lsoft commented 6 months ago

We are using 17.8 msbuild which uses https://www.nuget.org/packages/Microsoft.CodeAnalysis.Common/4.8.0#dependencies-body-tab (see [System.Collections.Immutable](https://www.nuget.org/packages/System.Collections.Immutable/) (>= 7.0.0))

But in https://github.com/zompinc/sync-method-generator/commit/91c81e4b4eb935b402ff7969c61fd6fd8935bd74 you bumped version of codeanalysis to 4.9.2. Compare immutable nuget dependency https://www.nuget.org/packages/Microsoft.CodeAnalysis.Common/4.9.2#dependencies-body-tab

As a result, if the user using msbuild older than 17.9 he/she will see the following:

In project *****: All analyzers from assembly Zomp.SyncMethodGenerator failed to load: Unable to load one or more of the requested types. Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

At the time, I have to revert to 1.3.17 until we finished updating our building agents.


Probably, such behaviour is not what you expect (including me). :) It is not good to require people to update to the latest version of msbuild infrastructure (this have its cost). From the other hand, having very old dependency in nuget is not good too.

I guess we need some compromise here :)

Thanks.

virzak commented 6 months ago

Weird, but reverted and released

lsoft commented 6 months ago

@virzak yeah, that was unexpected for us!)) thank you!

virzak commented 2 months ago

I wonder if I should upgrade to 4.10.0. Do you think it will cause issues?

lsoft commented 2 months ago

@virzak I think that's fine if you will update your dependencies. The power of current version of the generator is enough for us, so, in worst case, we continue to use the current version until we upgrade our msbuilds.