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 EnableRequestDelegateGenerator flag #29982

Merged
merged 13 commits into from
Jan 19, 2023

Conversation

captainsafia
Copy link
Member

Part of dotnet/aspnetcore#45524.

This new source generator is shipped as part of the Microsoft.AspNetCore.App ref pack. We want to have it disabled by default so we add some build logic to the web template to disable it unless explicitly enabled by setting the EnableRequestDelegateGenerator build property.

@dotnet-issue-labeler dotnet-issue-labeler bot added the Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch label Jan 17, 2023
@captainsafia captainsafia requested a review from a team as a code owner January 17, 2023 23:54
Copy link
Member

@dsplaisted dsplaisted left a comment

Choose a reason for hiding this comment

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

Looks good, see comments on tests.

@captainsafia captainsafia requested a review from a team as a code owner January 18, 2023 02:01
@@ -5,13 +5,21 @@ Usage:
dotnet new TestAssets.PostActions.RunScript.Basic [options] [template options]

Options:
-n, --name <name> The name for the output being created. If no name is specified, the name of the output directory is used.
-n, --name <name> The name for the output being created. If no
Copy link
Member

Choose a reason for hiding this comment

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

Is this change supposed to change width of output?
this looks suspicious

Copy link
Contributor

Choose a reason for hiding this comment

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

src/Tests/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnLanguage.verified.txt also changed from -f, --framework <net6.0|net7.0|net8.0> to -f, --framework <choice>, i.e. it's not merely a matter of width.

Copy link
Member

Choose a reason for hiding this comment

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

In this example it's just width, and it is a concern.

Copy link
Member Author

Choose a reason for hiding this comment

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

There's a fairly chunky delta between the SDK this PR updates to and the one that we were previously targeting so I'm not sure what exactly caused this change.

I will say that enforcing a consistent line width on the console output seemed like a sensible bug fix to me.

Where is the repo that these code changes are sourced from?

Copy link
Member

Choose a reason for hiding this comment

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

This may be a change in System.CommandLine. @baronfel

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm, I think there might be an error on my part here. The whitespace inconsistencies replicate on my local machine (where I produced the snapshots), but it looks like the tests on the build machines emit outputs without a wrapped width.

Is there a chance there is an option on my local machine that causes this behavior?

@captainsafia
Copy link
Member Author

I resolved a few issues that sprung up during the SDK update. There is one remaining issue affecting the tests:

error : Native compilation can run on x64 and arm64 hosts only. [C:\h\w\A17A0910\t\dotnetSdkTests\d4zwfkrm.hic\TrimmingOptio---F18EF6A1\HelloWorld\HelloWorld.csproj]

which seems to originate from dotnet/runtime@b2dc37b.

@MichalStrehovsky Any thoughts on what might've triggered this in our build set? I was under the impression that the Helix machines were 64-bit so surprised the error is surfacing...

Copy link
Member

@MackinnonBuck MackinnonBuck left a comment

Choose a reason for hiding this comment

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

LGTM!

@MichalStrehovsky
Copy link
Member

@MichalStrehovsky Any thoughts on what might've triggered this in our build set? I was under the impression that the Helix machines were 64-bit so surprised the error is surfacing...

I think this will be fixed by dotnet/runtime#80752.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants