Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ Copyright (c) .NET Foundation. All rights reserved.
AddModules="@(AddModules)"
AdditionalFiles="@(AdditionalFiles)"
AllowUnsafeBlocks="$(AllowUnsafeBlocks)"
Analyzers="@(Analyzer)"

Choose a reason for hiding this comment

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

@pranavkm couldn't we just remove the ANalyzers from this phase wholesale?

Copy link
Member

Choose a reason for hiding this comment

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

Source generators are also considered analyzers, and they need to happen in this phase.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, thats the problem, and why we added the new SkipAnalyzers argument.

Equally we're going to have this issue if a generator emits a warning too, so we might need to re-think the strategy a little bit? I wonder if we should just disable all wanings (-warn 0) for the component discovery phase? That way any warnings would only show up in the second phase, and errors in the first phase would stop the second running anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll give bumping up the SDK another try. If we get it updated to the latest and greatest, perhaps we get this change in as-is.

Choose a reason for hiding this comment

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

I wonder if we should just disable all wanings (-warn 0) for the component discovery phase? That way any warnings would only show up in the second phase, and errors in the first phase would stop the second running anyway.

ya I think that'd be best

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I've disabled warnings and removed the SkipAnalyzers param. Means that phase might be a little slower until you upgrade the SDK and can use it again, but everything should work as expected.

Copy link
Member

Choose a reason for hiding this comment

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

Should we file a follow up issue to move to SkipAnalyzers at some point in the future?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I'll open an issue to track.

ApplicationConfiguration="$(AppConfigForCompiler)"
BaseAddress="$(BaseAddress)"
CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)"
Expand Down Expand Up @@ -242,7 +243,7 @@ Copyright (c) .NET Foundation. All rights reserved.
UseSharedCompilation="$(UseSharedCompilation)"
Utf8Output="$(Utf8Output)"
VsSessionGuid="$(VsSessionGuid)"
WarningLevel="$(WarningLevel)"
WarningLevel="0"
WarningsAsErrors="$(WarningsAsErrors)"
WarningsNotAsErrors="$(WarningsNotAsErrors)"
PathMap="$(PathMap)"
Expand Down