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

Api baselines #25386

Merged
merged 7 commits into from
Sep 1, 2020
Merged

Api baselines #25386

merged 7 commits into from
Sep 1, 2020

Conversation

Pilchie
Copy link
Member

@Pilchie Pilchie commented Aug 28, 2020

Resolves part of #24347

@Pilchie Pilchie added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Aug 28, 2020
@Pilchie Pilchie added this to the 5.0.0-rc1 milestone Aug 28, 2020
@Pilchie Pilchie requested review from dougbu and javiercn August 28, 2020 23:57
@Pilchie Pilchie requested a review from Tratcher as a code owner August 28, 2020 23:57
@@ -0,0 +1 @@
#nullable enable
Copy link
Member Author

Choose a reason for hiding this comment

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

@dougbu Pretty sure this project has public API, but the analyzer isn't running on it. Thoughts on why not?

Copy link
Member

Choose a reason for hiding this comment

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

I specifically include only projects with '$(IsImplementationProject)' == 'true' and that excludes analyzer projects. From a compatibility POV, adding or removing public surface in these projects shouldn't matter. So, these files can be removed.

Side note: I also excluded all projects in the src/Tools/ directory (well, anything w/ a relative path that includes "Tools") for similar reasons. Might need to exclude msbuild tasks too (for the Razor SDK) but I didn't get there.

Copy link
Member

Choose a reason for hiding this comment

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

BTW I wasn't sure whether the analyzers folder contained anything w/ important public API e.g. a base package when I wrote up #24347. Sorry.

@@ -0,0 +1 @@
#nullable enable
Copy link
Member Author

Choose a reason for hiding this comment

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

Another example of a project that has public API, but the analyzer isn't running on.

Copy link
Member

Choose a reason for hiding this comment

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

Project file contains <IsImplementationProject>false</IsImplementationProject> so it's excluded from the analysis

@@ -0,0 +1 @@
#nullable enable
Copy link
Member Author

Choose a reason for hiding this comment

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

@mavasani Regarding this, how much does it matter whether we've actually started annotating these libraries here?

Choose a reason for hiding this comment

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

@jcouv would be a better person to answer this.

Copy link
Member

Choose a reason for hiding this comment

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

Based on the lack of errors about this, I suggest we include #nullable enable everywhere. Makes life simpler.

@Pilchie
Copy link
Member Author

Pilchie commented Aug 29, 2020

Hmm. VS had no errors, but the commandline is definitely unhappy 😢

@dougbu
Copy link
Member

dougbu commented Aug 29, 2020

@Pilchie on the failures, it looks like you're hitting a conflict with 00bbb78 aka @pranavkm's #25275 fix.

@dougbu dougbu closed this Aug 29, 2020
@dougbu dougbu reopened this Aug 29, 2020
@dougbu
Copy link
Member

dougbu commented Aug 29, 2020

Sorry, unintended the close

Copy link
Member

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

Let's consistently use attributes for the RS00XY suppressions

* Antiforgery
* Azure
* Configuration.KeyPerFile
* DataProtection
* DefaultBuilder
* Features/JsonPatch
* FileProviders
* HealthChecks
* Hosting
@Pilchie
Copy link
Member Author

Pilchie commented Aug 31, 2020

Hmm. I'm going to temporarily remove the PublicAPI files from the AzureAD.UI and AzureADB2C.UI projects. Seems like there are a couple of problems with using them in razor projects:

  1. The analyzer gets passed to both compilation phases, so if the razor generated members are present, it complains during the second compile, but if they are present it complains during the first compile 😦 .
  2. The fix in VS doesn't actually generate anything for the razor generated members.

@mavasani any suggestions on how do support this?

@chsienki - this is similar to the source generator issue with razor compilation. Any ideas?

@pranavkm / @jaredpar - FYI.

@@ -38,6 +39,7 @@ public abstract class HealthCheckService
/// A <see cref="Task{T}"/> which will complete when all the health checks have been run,
/// yielding a <see cref="HealthReport"/> containing the results.
/// </returns>
[SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Required to maintain compatibility")]
public Task<HealthReport> CheckHealthAsync(CancellationToken cancellationToken = default)
Copy link
Member

Choose a reason for hiding this comment

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

nit: I wish the analyzer would suppress itself when the only optional parameter is a CancellationToken. The "overload for int, float, … cases e.g. WriteAsync(...) methods and similar are causing a lot of suppression noise.

@sharwell @mavasani @jcouv

@Pilchie Pilchie added Servicing-approved Shiproom has approved the issue auto-merge labels Sep 1, 2020
@ghost
Copy link

ghost commented Sep 1, 2020

Hello @Pilchie!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@Pilchie
Copy link
Member Author

Pilchie commented Sep 1, 2020

I'm going to go ahead and approve my own PR.

@ghost
Copy link

ghost commented Sep 1, 2020

Apologies, while this PR appears ready to be merged, it looks like release/5.0 is a protected branch and I have not been granted permission to perform the merge.

@dougbu
Copy link
Member

dougbu commented Sep 1, 2020

Didn't I approve it❔ And, ugh, you're hitting the overlapping PDB problem here too☹️

@Pilchie
Copy link
Member Author

Pilchie commented Sep 1, 2020

I mean ask-mode approval ;)

@ghost
Copy link

ghost commented Sep 1, 2020

Apologies, while this PR appears ready to be merged, it looks like release/5.0 is a protected branch and I have not been granted permission to perform the merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants