TelegramBots / Telegram.Bot

.NET Client for Telegram Bot API
https://telegrambots.github.io/book
MIT License
3.22k stars 690 forks source link

Test Newtonsoft.Json v11 #664

Closed tuscen closed 6 years ago

tuscen commented 6 years ago

We should make a separate branch with v11 and test whether it won't cause any problems for projects that depend on earlier versions.

karb0f0s commented 6 years ago

here is the branch: https://github.com/TelegramBots/Telegram.Bot/tree/update_ex?files=1

karb0f0s commented 6 years ago

https://softwareengineering.stackexchange.com/questions/336279/policies-on-nuget-dependencies-versions-when-developing-a-library

tuscen commented 6 years ago

@karb0f0s thank you. Didn't know about that. But there's another thing that bothers me and I don't see it mentioned in the answer: what if my library not only uses json internally but also exposes some methods that accept types from the json lib (e.g. JsonSerializerSettings). It will expect types from the version my lib uses, but the project that uses my lib can have higher version with breaking changes. What will happen in that case? E.g. ASP.NET Core MVC package is doing exactly this: you can pass your own settings to it.

karb0f0s commented 6 years ago

as I understand, if one library exposes methods, that use external lib reference, than latest external ref wins. but, if you specify compatibility range in lib references, then lowest version wins :-/. idk how's all that supposed to work in real project, how can you tell which version is used during runtime? get assembly.version through reflection?

poulad commented 6 years ago

I think we should be good with using v11 in our next release.