Coder Social home page Coder Social logo

Comments (4)

halspang avatar halspang commented on June 10, 2024

@philliphoff - Would this be a breaking change if we switched them all over? Or is there a way to avoid that?

Or, is this proposal just to use it for new features and the old features will be [Obsolete] until they're no longer preview?

from dotnet-sdk.

philliphoff avatar philliphoff commented on June 10, 2024

@halspang Yes, it would be breaking in that it's a different compiler/analyzer error to disable. That said, I just discovered that .NET 8 includes a new ExperimentalAttribute which seems even closer to what we want. (RequiresPreviewFeaturesAttribute was originally targeted at APIs in .NET itself but would still have been better than ObsoleteAttribute.) I suggest we wait until .NET 6 support is dropped and then switch to ExperimentalAttribute, as a whole, so users needn't have to change how they suppress the warnings more than once.

from dotnet-sdk.

Neme12 avatar Neme12 commented on June 10, 2024

@philliphoff Couldn't the analyzer just suggest using ExperimentalAttribute if it exists? That means for users on .NET 8 and others who define it. From what I understand, others can define it in their own code as well even on a lower TFM, just like many other attributes that the compiler understands - they're not required to come from mscorlib.

Also, regardless of whether it supports the atribute being defined manually (which it should IMO, there's no reason not to - it's simple to just check whether a type named System.Diagnostics.CodeAnalysis.ExperimentalAttribute exists), why wait until .NET 6 support is dropped when .NET 8 already exists and the analyzer could already work on .NET 8?

from dotnet-sdk.

Neme12 avatar Neme12 commented on June 10, 2024

Oh, this isn't about an analyzer, my bad.

from dotnet-sdk.

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.