Giter VIP home page Giter VIP logo

Comments (6)

mfkl avatar mfkl commented on August 25, 2024

Sure, I guess this is a reasonable change. Are you currently blocked by this though?

Feel free to send a PR!

from consuldotnet.

marcin-krystianc avatar marcin-krystianc commented on August 25, 2024

Whenever we accept any changes like this, we need to consider its binary compatibility.
I think here, the change would be binary incompatible. So on one hand I get the argument that we shouldn't use concrete types on our public interfaces, but on the other hand I think we should just prioritise binary compatibility.

from consuldotnet.

Bergiu avatar Bergiu commented on August 25, 2024

this caused problems for a short time when i wanted to mock it in a unit test. but then i found a solution around it and the problem doesn't block me anymore. i just wanted to point out that there could be advantages to use IDictionary there. unfortunately i don't know what is meant by binary compatibility.

i'll gladly do a pr. if binary compatibility is more important, then you can just decline it.

from consuldotnet.

Bergiu avatar Bergiu commented on August 25, 2024

There are also other occurrences in properties:

And as types in functions:

And in interfaces:

from consuldotnet.

Bergiu avatar Bergiu commented on August 25, 2024

I've made two branches: "master" that contains the changes only in Catalog.cs, and "more" that contains all changes.

please let me know if i should make a pr from any of those branches.

from consuldotnet.

marcin-krystianc avatar marcin-krystianc commented on August 25, 2024

unfortunately i don't know what is meant by binary compatibility.

By binary compatibility I mean the compatibility when at runtime an assembly references different version of an assembly than was used to compile that particular assembly. It is possible that some library can be compiled against Consul 1.6.10.7, but at runtime it will be using higher version (e.g. Consul 1.6.10.8). If the newer version is not binary compatible with older version, we will get runtime errors like this one:

Unhandled exception. System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Consul.QueryResult`1<System.Collections.Generic.Dictionary`2<System.String,System.String[]>>> Consul.ICatalogEndpoint.Services(System.Threading.CancellationToken)'.
   at ConsulTesting.Program.Main()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at ConsulTesting.Program.Main()
   at ConsulTesting.Program.<Main>()

In small solutions it is probably not an issue, as all projects are going to be compiled against the same version. Unfortunately, the larger the particular solution is, the more likely some projects or NuGet packages will use older version of Consul - and it will lead to fatal errors at runtime.

from consuldotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.