GithubHelp home page GithubHelp logo

Comments (4)

 avatar commented on May 17, 2024

Hello, 'Sergio0694! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future!

from dotnet.

michael-hawker avatar michael-hawker commented on May 17, 2024

@Sergio0694 would it make sense to keep the binaries in the Microsoft.Toolkit or a Microsoft.Toolkit.Diagnostics package, but then have a separate Microsoft.Toolkit.Diagnostics.Sources package like the examples in the article you shared? That'd help if our other packages start using them as they wouldn't be duplicating the source for each package using it, eh?

from dotnet.

Sergio0694 avatar Sergio0694 commented on May 17, 2024

@michael-hawker I'd say that regardless of the proposal for a source-only package, the idea of moving the Guard and ThrowHelper APIs to a separate, standalone Microsoft.Toolkit.Diagnostics package sounds great to me anyway 😄
That'd still mean that consumers would have more fine grained control over what APIs they're using in their apps, sure!

As for the bit about duplicating the sources in the other Toolkit projects, not sure that that'd be an issue, since we can just use [assembly: InternalsVisibleTo("...")] so that all the other projects would be able to use a single "copy" of all those APIs that they have access to through the base/diagnostics package. Of course that also depends on how we actually want to set that up though, as in, we might also just choose to depend on the .Diagnostics package too and consumers of the other packages would automatically inherit those APIs as well (like they do today). That depends on how we want to structure this, since those APIs would still be included in the actual binaries anyway (as other packages do use them).

As for the Microsoft.Toolkit.Diagnostics.Sources package, that name sounds perfect and it would convey the difference pretty clearly (so that other people would immediately know they won't actually take dependencies at runtime), so that sounds great! 👍

from dotnet.

yoshiask avatar yoshiask commented on May 17, 2024

Even if the package only contained the Guard and ThrowHelper APIs, those would still then be visible to consumers of those libraries, as indirect dependencies...

I've run into an issue related to this in the wild. One of my dependencies still uses the Microsoft.Toolkit.* packages, while my project uses the newer CommunityToolkit.* packages. The result is that my project has the same functionality under two different namespaces.

from dotnet.

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.