OpenMacroBoard / OpenMacroBoard.SDK

MIT License
20 stars 10 forks source link

Allow newer versions of System.Drawing.Common? #10

Closed ocdtrekkie closed 3 years ago

ocdtrekkie commented 3 years ago

I just started using this dependency in my app, and I noticed it's dependencies cannot be updated to the latest version: https://www.nuget.org/packages/OpenMacroBoard.SDK/2.1.0

System.Drawing.Common has released version 5.0.0, and this dependency blocks it from being updated. Are there breaking changes in 5.0.0 that impact OpenMacroBoard?

ocdtrekkie commented 3 years ago

Ah, this is actually expressed in StreamDeckSharp itself: https://github.com/OpenMacroBoard/StreamDeckSharp/blob/master/src/StreamDeckSharp/StreamDeckSharp.nuspec#L20

wischi-chr commented 3 years ago

I'm currently capping it because a new major version could introduce breaking changes to the API. I'm not sure how I should tackle this to allow updates but only if there are no breaking changes. Theoretically System.Drawing.Common could remove a method this library uses and updating it would cause it to fail at runtime.

Currently the only option probably is for me to review changes and release a new package that does support the new version of System.Drawing.Common. I'm not sure how other packages handle that problem and I probably need to look into that.

ocdtrekkie commented 3 years ago

@wischi-chr I think if .NET isn't going to make major breaking changes like removing functions, it's probably safe to use your strategy, though it does mean that on each major .NET version, you'll need to vet it and bump your NuGet package up. According to https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/ it looks like "once a year" is the bar here, which isn't particularly egregious or tedious.

ocdtrekkie commented 3 years ago

Though FWIW, .NET tends to be really hesitant to remove even significantly not recommended methods. System.Drawing functions have been around since... .NET Framework 1.1, and for not-breaking-existing-projects reasons, I think it's incredibly unlikely they'd remove anything fundamental to it. If you wanted to unbound it and just wait for a "stuff is broken" issue report... there's a good chance you'll never see one.

Otherwise, if you can check for breakage and then bump it to < 6, that'd solve this for the next 10 months! :)

wischi-chr commented 3 years ago

If you wanted to unbound it and just wait for a "stuff is broken" issue report... there's a good chance you'll never see one.

Good point. Just released a new version and the System.Drawing.Common is no longer bound (at least no upper limit)

Pls let me know if it works for you.