-
Notifications
You must be signed in to change notification settings - Fork 230
Add global:: to default usings
#8314
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
Changes from 5 commits
0d1faff
af335c3
4f09abc
7e90f94
386a4d6
68c475c
d22826a
7dc27bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,10 +54,7 @@ private void WriteDesignTimeDirectiveToken(CodeRenderingContext context, DesignT | |
| } | ||
|
|
||
| // Wrap the directive token in a lambda to isolate variable names. | ||
| context.CodeWriter | ||
| .Write("((") | ||
| .Write(typeof(Action).FullName) | ||
| .Write(")("); | ||
|
Comment on lines
-57
to
-60
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💭 I think I might prefer the form on the left, and just change |
||
| context.CodeWriter.Write("((global::System.Action)("); | ||
| using (context.CodeWriter.BuildLambda()) | ||
| { | ||
| var originalIndent = context.CodeWriter.CurrentIndent; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // <auto-generated/> | ||
| #pragma warning disable 1591 | ||
| namespace X.System.Y | ||
| { | ||
| #line hidden | ||
| using global::System; | ||
| using global::System.Collections.Generic; | ||
| using global::System.Linq; | ||
| using global::System.Threading.Tasks; | ||
| using global::Microsoft.AspNetCore.Components; | ||
| public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase | ||
| { | ||
| #pragma warning disable 219 | ||
| private void __RazorDirectiveTokenHelpers__() { | ||
| ((global::System.Action)(() => { | ||
| #nullable restore | ||
| #line 1 "x:\dir\subdir\Test\TestComponent.cshtml" | ||
| global::System.Object __typeHelper = nameof(X.System.Y); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 I'm expecting this to be just
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't plan to update everything to
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| #line default | ||
| #line hidden | ||
| #nullable disable | ||
| } | ||
| ))(); | ||
| } | ||
| #pragma warning restore 219 | ||
| #pragma warning disable 0414 | ||
| private static object __o = null; | ||
| #pragma warning restore 0414 | ||
| #pragma warning disable 1998 | ||
| protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) | ||
| { | ||
| } | ||
| #pragma warning restore 1998 | ||
| } | ||
| } | ||
| #pragma warning restore 1591 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| Document - | ||
| NamespaceDeclaration - - X.System.Y | ||
| UsingDirective - (3:1,1 [20] ) - global::System | ||
| UsingDirective - (26:2,1 [40] ) - global::System.Collections.Generic | ||
| UsingDirective - (69:3,1 [25] ) - global::System.Linq | ||
| UsingDirective - (97:4,1 [36] ) - global::System.Threading.Tasks | ||
| UsingDirective - (136:5,1 [45] ) - global::Microsoft.AspNetCore.Components | ||
| ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - | ||
| DesignTimeDirective - | ||
| DirectiveToken - (11:0,11 [10] x:\dir\subdir\Test\TestComponent.cshtml) - X.System.Y | ||
| CSharpCode - | ||
| IntermediateToken - - CSharp - #pragma warning disable 0414 | ||
| CSharpCode - | ||
| IntermediateToken - - CSharp - private static object __o = null; | ||
| CSharpCode - | ||
| IntermediateToken - - CSharp - #pragma warning restore 0414 | ||
| MethodDeclaration - - protected override - void - BuildRenderTree |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Source Location: (11:0,11 [10] x:\dir\subdir\Test\TestComponent.cshtml) | ||
| |X.System.Y| | ||
| Generated Location: (649:17,44 [10] ) | ||
| |X.System.Y| | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // <auto-generated/> | ||
| #pragma warning disable 1591 | ||
| namespace X.System.Y | ||
| { | ||
| #line hidden | ||
| using global::System; | ||
| using global::System.Collections.Generic; | ||
| using global::System.Linq; | ||
| using global::System.Threading.Tasks; | ||
| using global::Microsoft.AspNetCore.Components; | ||
| public partial class TestComponent : global::Microsoft.AspNetCore.Components.ComponentBase | ||
| { | ||
| #pragma warning disable 1998 | ||
| protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) | ||
| { | ||
| } | ||
| #pragma warning restore 1998 | ||
| } | ||
| } | ||
| #pragma warning restore 1591 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Document - | ||
| NamespaceDeclaration - - X.System.Y | ||
| UsingDirective - (3:1,1 [22] ) - global::System | ||
| UsingDirective - (26:2,1 [42] ) - global::System.Collections.Generic | ||
| UsingDirective - (69:3,1 [27] ) - global::System.Linq | ||
| UsingDirective - (97:4,1 [38] ) - global::System.Threading.Tasks | ||
| UsingDirective - (136:5,1 [47] ) - global::Microsoft.AspNetCore.Components | ||
| ClassDeclaration - - public partial - TestComponent - global::Microsoft.AspNetCore.Components.ComponentBase - | ||
| MethodDeclaration - - protected override - void - BuildRenderTree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 It's difficult to review the impact of this change in isolation because baselines weren't updated with each change
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because this change caused failures - there was a new warning about duplicate usings in the new tests. I don't think anything changed in the old tests. But I could verify that.