-
Notifications
You must be signed in to change notification settings - Fork 241
Add source mapping for @rendermode
#12592
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
Closed
davidwengier
wants to merge
10
commits into
dotnet:dev/dawengie/RenderModeWithTypeParam
from
davidwengier:dev/dawengie/RenderModeSourceMapping
Closed
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4ac41c0
Create one failing test, and one passing with our desired state
davidwengier 860713a
Map the directive contents
davidwengier ee76ed5
Add regression test to ensure no difference in line directives for Ra…
davidwengier 2361593
Add ability for tests to customize project generation
davidwengier 6b97b5f
Oops, missed a few baselines
davidwengier 9ed9efa
Update directive test baselines
davidwengier 6424d39
Regenerate baselines for a couple of compiler integration tests, for …
davidwengier dbbf5a8
Update compiler test baselines
davidwengier 355180a
Fix tests
davidwengier 8e8c83e
Cross platform fix
davidwengier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...soft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/RenderFragment.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| Line Δ, Char Δ, Length, Type, Modifier(s), Text | ||
| 0 0 1 razorTransition [] [@] | ||
| 0 1 10 razorDirective [] [rendermode] | ||
| 0 11 9 namespace name [] [Microsoft] | ||
| 0 9 1 operator [] [.] | ||
| 0 1 10 namespace name [] [AspNetCore] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 10 namespace name [] [Components] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 3 namespace name [] [Web] | ||
| 0 3 1 operator [] [.] | ||
| 0 1 10 class name [static] [RenderMode] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 17 property name [static] [InteractiveServer] | ||
| 2 0 4 markupCommentPunctuation [] [<!--] | ||
| 0 4 47 markupComment [] [ above and below should be classified the same ] | ||
| 0 47 3 markupCommentPunctuation [] [-->] | ||
| 2 0 1 razorTransition [] [@] | ||
| 0 1 1 razorTransition [] [{] | ||
| 1 4 3 keyword [] [var] | ||
| 0 4 1 local name [] [r] | ||
| 0 2 1 operator [] [=] | ||
| 0 2 9 namespace name [] [Microsoft] | ||
| 0 9 1 operator [] [.] | ||
| 0 1 10 namespace name [] [AspNetCore] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 10 namespace name [] [Components] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 3 namespace name [] [Web] | ||
| 0 3 1 operator [] [.] | ||
| 0 1 10 class name [static] [RenderMode] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 15 property name [static] [InteractiveAuto] | ||
| 0 15 1 punctuation [] [;] | ||
| 1 0 1 razorTransition [] [}] |
38 changes: 38 additions & 0 deletions
38
...Studio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/RenderFragment_Expression.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| Line Δ, Char Δ, Length, Type, Modifier(s), Text | ||
| 0 0 1 razorTransition [] [@] | ||
| 0 1 10 razorDirective [] [rendermode] | ||
| 0 11 1 razorTransition [] [@] | ||
| 0 1 1 razorTransition [] [(] | ||
| 0 1 9 namespace name [] [Microsoft] | ||
| 0 9 1 operator [] [.] | ||
| 0 1 10 namespace name [] [AspNetCore] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 10 namespace name [] [Components] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 3 namespace name [] [Web] | ||
| 0 3 1 operator [] [.] | ||
| 0 1 10 class name [static] [RenderMode] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 17 property name [static] [InteractiveServer] | ||
| 0 17 1 razorTransition [] [)] | ||
| 2 0 4 markupCommentPunctuation [] [<!--] | ||
| 0 4 47 markupComment [] [ above and below should be classified the same ] | ||
| 0 47 3 markupCommentPunctuation [] [-->] | ||
| 2 0 1 razorTransition [] [@] | ||
| 0 1 1 razorTransition [] [{] | ||
| 1 4 3 keyword [] [var] | ||
| 0 4 1 local name [] [r] | ||
| 0 2 1 operator [] [=] | ||
| 0 2 9 namespace name [] [Microsoft] | ||
| 0 9 1 operator [] [.] | ||
| 0 1 10 namespace name [] [AspNetCore] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 10 namespace name [] [Components] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 3 namespace name [] [Web] | ||
| 0 3 1 operator [] [.] | ||
| 0 1 10 class name [static] [RenderMode] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 15 property name [static] [InteractiveAuto] | ||
| 0 15 1 punctuation [] [;] | ||
| 1 0 1 razorTransition [] [}] |
38 changes: 38 additions & 0 deletions
38
...guageServices.Razor.Test/TestFiles/SemanticTokens/RenderFragment_Expression_misc_file.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| Line Δ, Char Δ, Length, Type, Modifier(s), Text | ||
| 0 0 1 razorTransition [] [@] | ||
| 0 1 10 razorDirective [] [rendermode] | ||
| 0 11 1 razorTransition [] [@] | ||
| 0 1 1 razorTransition [] [(] | ||
| 0 1 9 namespace name [] [Microsoft] | ||
| 0 9 1 operator [] [.] | ||
| 0 1 10 variable [] [AspNetCore] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 10 variable [] [Components] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 3 variable [] [Web] | ||
| 0 3 1 operator [] [.] | ||
| 0 1 10 variable [] [RenderMode] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 17 variable [] [InteractiveServer] | ||
| 0 17 1 razorTransition [] [)] | ||
| 2 0 4 markupCommentPunctuation [] [<!--] | ||
| 0 4 47 markupComment [] [ above and below should be classified the same ] | ||
| 0 47 3 markupCommentPunctuation [] [-->] | ||
| 2 0 1 razorTransition [] [@] | ||
| 0 1 1 razorTransition [] [{] | ||
| 1 4 3 keyword [] [var] | ||
| 0 4 1 local name [] [r] | ||
| 0 2 1 operator [] [=] | ||
| 0 2 9 namespace name [] [Microsoft] | ||
| 0 9 1 operator [] [.] | ||
| 0 1 10 variable [] [AspNetCore] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 10 variable [] [Components] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 3 variable [] [Web] | ||
| 0 3 1 operator [] [.] | ||
| 0 1 10 variable [] [RenderMode] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 15 variable [] [InteractiveAuto] | ||
| 0 15 1 punctuation [] [;] | ||
| 1 0 1 razorTransition [] [}] |
42 changes: 42 additions & 0 deletions
42
...ervices.Razor.Test/TestFiles/SemanticTokens/RenderFragment_Expression_with_background.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| Line Δ, Char Δ, Length, Type, Modifier(s), Text | ||
| 0 0 1 razorTransition [] [@] | ||
| 0 1 10 razorDirective [] [rendermode] | ||
| 0 11 1 razorTransition [] [@] | ||
| 0 1 1 razorTransition [razorCode] [(] | ||
| 0 1 9 namespace name [razorCode] [Microsoft] | ||
| 0 9 1 operator [razorCode] [.] | ||
| 0 1 10 namespace name [razorCode] [AspNetCore] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 10 namespace name [razorCode] [Components] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 3 namespace name [razorCode] [Web] | ||
| 0 3 1 operator [razorCode] [.] | ||
| 0 1 10 class name [static, razorCode] [RenderMode] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 17 property name [static, razorCode] [InteractiveServer] | ||
| 0 17 1 razorTransition [razorCode] [)] | ||
| 2 0 4 markupCommentPunctuation [] [<!--] | ||
| 0 4 47 markupComment [] [ above and below should be classified the same ] | ||
| 0 47 3 markupCommentPunctuation [] [-->] | ||
| 2 0 1 razorTransition [razorCode] [@] | ||
| 0 1 1 razorTransition [razorCode] [{] | ||
| 1 0 4 markupTextLiteral [razorCode] [ ] | ||
| 0 4 3 keyword [razorCode] [var] | ||
| 0 3 1 markupTextLiteral [razorCode] [ ] | ||
| 0 1 1 local name [razorCode] [r] | ||
| 0 1 1 markupTextLiteral [razorCode] [ ] | ||
| 0 1 1 operator [razorCode] [=] | ||
| 0 1 1 markupTextLiteral [razorCode] [ ] | ||
| 0 1 9 namespace name [razorCode] [Microsoft] | ||
| 0 9 1 operator [razorCode] [.] | ||
| 0 1 10 namespace name [razorCode] [AspNetCore] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 10 namespace name [razorCode] [Components] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 3 namespace name [razorCode] [Web] | ||
| 0 3 1 operator [razorCode] [.] | ||
| 0 1 10 class name [static, razorCode] [RenderMode] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 15 property name [static, razorCode] [InteractiveAuto] | ||
| 0 15 1 punctuation [razorCode] [;] | ||
| 1 0 1 razorTransition [razorCode] [}] |
42 changes: 42 additions & 0 deletions
42
...zor.Test/TestFiles/SemanticTokens/RenderFragment_Expression_with_background_misc_file.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| Line Δ, Char Δ, Length, Type, Modifier(s), Text | ||
| 0 0 1 razorTransition [] [@] | ||
| 0 1 10 razorDirective [] [rendermode] | ||
| 0 11 1 razorTransition [] [@] | ||
| 0 1 1 razorTransition [razorCode] [(] | ||
| 0 1 9 namespace name [razorCode] [Microsoft] | ||
| 0 9 1 operator [razorCode] [.] | ||
| 0 1 10 variable [razorCode] [AspNetCore] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 10 variable [razorCode] [Components] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 3 variable [razorCode] [Web] | ||
| 0 3 1 operator [razorCode] [.] | ||
| 0 1 10 variable [razorCode] [RenderMode] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 17 variable [razorCode] [InteractiveServer] | ||
| 0 17 1 razorTransition [razorCode] [)] | ||
| 2 0 4 markupCommentPunctuation [] [<!--] | ||
| 0 4 47 markupComment [] [ above and below should be classified the same ] | ||
| 0 47 3 markupCommentPunctuation [] [-->] | ||
| 2 0 1 razorTransition [razorCode] [@] | ||
| 0 1 1 razorTransition [razorCode] [{] | ||
| 1 0 4 markupTextLiteral [razorCode] [ ] | ||
| 0 4 3 keyword [razorCode] [var] | ||
| 0 3 1 markupTextLiteral [razorCode] [ ] | ||
| 0 1 1 local name [razorCode] [r] | ||
| 0 1 1 markupTextLiteral [razorCode] [ ] | ||
| 0 1 1 operator [razorCode] [=] | ||
| 0 1 1 markupTextLiteral [razorCode] [ ] | ||
| 0 1 9 namespace name [razorCode] [Microsoft] | ||
| 0 9 1 operator [razorCode] [.] | ||
| 0 1 10 variable [razorCode] [AspNetCore] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 10 variable [razorCode] [Components] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 3 variable [razorCode] [Web] | ||
| 0 3 1 operator [razorCode] [.] | ||
| 0 1 10 variable [razorCode] [RenderMode] | ||
| 0 10 1 operator [razorCode] [.] | ||
| 0 1 15 variable [razorCode] [InteractiveAuto] | ||
| 0 15 1 punctuation [razorCode] [;] | ||
| 1 0 1 razorTransition [razorCode] [}] |
24 changes: 24 additions & 0 deletions
24
...sualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/RenderFragment_Razor9.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| Line Δ, Char Δ, Length, Type, Modifier(s), Text | ||
| 0 0 1 razorTransition [] [@] | ||
| 0 1 10 razorDirective [] [rendermode] | ||
| 2 0 4 markupCommentPunctuation [] [<!--] | ||
| 0 4 64 markupComment [] [ above and below should NOT be classified the same in Razor 9.0 ] | ||
| 0 64 3 markupCommentPunctuation [] [-->] | ||
| 2 0 1 razorTransition [] [@] | ||
| 0 1 1 razorTransition [] [{] | ||
| 1 4 3 keyword [] [var] | ||
| 0 4 1 local name [] [r] | ||
| 0 2 1 operator [] [=] | ||
| 0 2 9 namespace name [] [Microsoft] | ||
| 0 9 1 operator [] [.] | ||
| 0 1 10 namespace name [] [AspNetCore] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 10 namespace name [] [Components] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 3 namespace name [] [Web] | ||
| 0 3 1 operator [] [.] | ||
| 0 1 10 class name [static] [RenderMode] | ||
| 0 10 1 operator [] [.] | ||
| 0 1 15 property name [static] [InteractiveAuto] | ||
| 0 15 1 punctuation [] [;] | ||
| 1 0 1 razorTransition [] [}] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Rather than gating this on a language version, we could just add a source mapping and not a line directive for these, which would solve the problem in the IDE, but wouldn't solve CLI build diagnostics (which are presumably broken), and would mean adding a new property to IntermediateNode so wanted to see if anyone cared first.