influxdb-client-csharp
influxdb-client-csharp copied to clipboard
Get rid of System.Drawing.Common dependency
Proposal: It would be quite useful to get rid of System.Drawing.Common dependency.
Current behavior: My project uses the latest at the moment InfluxDB.Client 4.4.0. When I publish the project, the publish files contains runtimes\win\lib\net6.0\System.Drawing.Common.dll and runtimes\unix\lib\net6.0\System.Drawing.Common.dll System.Drawing is outdated and not managed library. Having it is weird, because the client doesn't work with any graphics.
Desired behavior: Have no System.Drawing in publish files.
Alternatives considered: no
Use case: For dotNet developers it's comfortable to use managed assemblies with low number of dependencies. The best situation when a client library has no dependencies except dotNet.
I've got all the above dlls when publish. Why not reduce the amount to at least 10 dlls.
For example, if I use CsvHelper.dll of another version in a big project, I got DLL hell.
System.Drawing.Common comes with System.Configuration.ConfigurationManager
InfluxDB.Client.Core depends on CsvHelper and Newtonsoft.Json. Probably, there are no too complex CSV conversions, and it's possible not depend on CsvHelper. Modern .NET, starting from Core 3.0, contains classes to work with JSON, and Newtonsoft probably can be replaced by classes from the System.Text.Json namespace.
Just an example of MQTT client dependencies, which also actively works with network:
Hi @2mik,
thanks for using our client. Is this something you might be willing to help with?
Regards
Hi, This issue affects the architecture of the client. That is why, I suppose, it should be implemented by the main author, I mean by you @bednar. If you decide to simplify the client dependencies, I'm ready to help with testing it on Windows and Linux. Also will be glad to take a part in discussions related to the issue.
InfluxDB.Client.Core depends on CsvHelper and Newtonsoft.Json.
Probably, there are no too complex CSV conversions, and it's possible not depend on CsvHelper.
Personally I'd rather have CSV parsing abstracted and available in InfluxDB.Client.CsvHelper
. Same for Newtonsoft.Json
since many people prefere to use e.g. System.Text.Json
.
And finally I think that also NodaTime
should be removed from main package. I'd prefer to install InfluxDB.Client.NodaTime
.