Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ExperimentalAttribute #6971

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Oct 3, 2023

Fixes #6759

Experimental items are shown in API files with a [diagnosticId] prefix, where diagnosticId is the ID provided to ExperimentalAttribute.

@sharwell sharwell requested a review from a team as a code owner October 3, 2023 16:14
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #6971 (dab5d0e) into main (8738efa) will increase coverage by 0.00%.
The diff coverage is 98.71%.

@@           Coverage Diff           @@
##             main    #6971   +/-   ##
=======================================
  Coverage   96.42%   96.43%           
=======================================
  Files        1410     1410           
  Lines      335881   335956   +75     
  Branches    11090    11095    +5     
=======================================
+ Hits       323879   323971   +92     
+ Misses       9209     9194   -15     
+ Partials     2793     2791    -2     

Copy link
Contributor

@mavasani mavasani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I’d prefer @jcouv to review it and merge once we have his approval.

@jcouv
Copy link
Member

jcouv commented Oct 5, 2023

Looking

[ID1]C.C() -> void";

await VerifyNet80CSharpAdditionalFileFixAsync(source, shippedText, unshippedText, fixedUnshippedText);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider also testing removal of Experimental attribute (shipped file contains the experiment, but API no longer marked as experimental) and change of Experimental attribute (however I'm not sure it's a realistic/common scenario)

Copy link
Member Author

@sharwell sharwell Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently this will be treated as simply removing an old API and adding a new one. It's not the best, but it should work for now. We can work to improve this experience in the future based on how things go with Roslyn experiments.

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (iteration 1) with some test suggestions to consider

@sharwell
Copy link
Member Author

sharwell commented Oct 5, 2023

@jcouv I'm going to submit new tests based on how this first round goes when I submit a PR with an experiment to Roslyn.

@sharwell sharwell merged commit 8b1675a into dotnet:main Oct 5, 2023
14 checks passed
@sharwell sharwell deleted the experimental-api branch October 5, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PublicApiAnalyzers awareness of ExperimentalAttribute annotations
3 participants