-
Notifications
You must be signed in to change notification settings - Fork 199
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
Merge main to tokenizer branch #10781
Merge main to tokenizer branch #10781
Conversation
Fixes something. Possibly breaks other things :)
…elease/dev17.8-to-release/dev17.10 * upstream/release/dev17.8: Manually reference Microsoft.IO.Redist 6.0.1 where needed to fix CG alerts. Upgrade testing analyzers to address CG alert.
This is an automatically generated pull request from release/dev17.8 into release/dev17.10. Once all conflicts are resolved and all the tests pass, you are free to merge the pull request. 🐯 ## Troubleshooting conflicts ### Identify authors of changes which introduced merge conflicts Scroll to the bottom, then for each file containing conflicts copy its path into the following searches: - https://github.com/dotnet/razor/find/release/dev17.8 - https://github.com/dotnet/razor/find/release/dev17.10 Usually the most recent change to a file between the two branches is considered to have introduced the conflicts, but sometimes it will be necessary to look for the conflicting lines and check the blame in each branch. Generally the author whose change introduced the conflicts should pull down this PR, fix the conflicts locally, then push up a commit resolving the conflicts. ### Resolve merge conflicts using your local repo Sometimes merge conflicts may be present on GitHub but merging locally will work without conflicts. This is due to differences between the merge algorithm used in local git versus the one used by GitHub. ``` bash git fetch --all git checkout -t upstream/merges/release/dev17.8-to-release/dev17.10 git reset --hard upstream/release/dev17.10 git merge upstream/release/dev17.8 # Fix merge conflicts git commit git push upstream merges/release/dev17.8-to-release/dev17.10 --force ```
Adds a single telemetry point so that we if we receive feedback that something unusual behavior occurs, we can determine if Fuse was engaged or not engaged.
…d remove duplicate
…t decides to skip a few things
…x tree for a C# document
This was a subtle future bug, that we would have hit when we removed the C# syntax tree bits in future. By checking for Razor GTD first we weren't deferring to Roslyn for plain attributes (ie, the case without `@bind-` in the tests) which means at best we do some extra unnecessary work, and at worst we could lose features for things Roslyn supports but we don't. I did not intend to find this bug when I started. Sorry for missing it in the PR Dustin. The key is that `ignoreAttributes` should have been `true` when porting over the code, and changing that would have made the test fail in your branch.
See comment in the file, but essentially this is the only way for the code that returns the generated documents syntax tree to be hit in cohosting.
In light of "should we get rid of document context" convo this morning, figured this made sense to do (and I needed _something_ on IDocumentSnapshot in order to actually make this whole idea work)
* Added new tests for the specific regressed scenario. * Allow `@@` sequences. Fixes dotnet/sdk#42730 for now. When we move to the new lexer, these will once again be disallowed; attempting to use runtime compilation will necessitate using the native lexer. * Fixup legacy test baselines
…x tree (dotnet#10765) This PR is a classic self-nerd-snipe, and resolves this comment: dotnet#10750 (comment) Also inadvertently found a slight "bug" with the existing go to def code in cohosting. Bug is in quotes because the actual user behaviour probably was identical in 99% of cases.
* Moving RazorFormattingService to common layer * Cleanup * Switch Razor LSP server code to use RazorFormattingService from common layer * Removing HTML formatting from common layer (for now) It requires services not easily available and will require extra work. For now leaving it in LSP server layer. Current need for the formatting service in cohosting is for OnAutoInsert which doesn't need HTML formatting. * Move AdhocServices, AdhoWorkspaceServices to common layer * Cleanup moved resources * Basic implementations for remote formatting classes * Removing hardcoded option value * Cleanup per CR suggestions * Cleanup doc-comments
# Conflicts: # eng/targets/Services.props # src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageServer.cs # src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Remote/RazorServices.cs
Fixes dotnet#10689 Roslyn side: dotnet/roslyn#74730 Looks good, despite the Roslyn side having VS deps for images: ![image](https://github.com/user-attachments/assets/44d2ac8d-f7c1-46ec-9572-15bfd91bed28)
This is an automatically generated pull request from release/dev17.11 into release/dev17.12. Once all conflicts are resolved and all the tests pass, you are free to merge the pull request. 🐯 ## Troubleshooting conflicts ### Identify authors of changes which introduced merge conflicts Scroll to the bottom, then for each file containing conflicts copy its path into the following searches: - https://github.com/dotnet/razor/find/release/dev17.11 - https://github.com/dotnet/razor/find/release/dev17.12 Usually the most recent change to a file between the two branches is considered to have introduced the conflicts, but sometimes it will be necessary to look for the conflicting lines and check the blame in each branch. Generally the author whose change introduced the conflicts should pull down this PR, fix the conflicts locally, then push up a commit resolving the conflicts. ### Resolve merge conflicts using your local repo Sometimes merge conflicts may be present on GitHub but merging locally will work without conflicts. This is due to differences between the merge algorithm used in local git versus the one used by GitHub. ``` bash git fetch --all git checkout -t upstream/merges/release/dev17.11-to-release/dev17.12 git reset --hard upstream/release/dev17.12 git merge upstream/release/dev17.11 # Fix merge conflicts git commit git push upstream merges/release/dev17.11-to-release/dev17.12 --force ```
This is an automatically generated pull request from release/dev17.12 into main. Once all conflicts are resolved and all the tests pass, you are free to merge the pull request. 🐯 ## Troubleshooting conflicts ### Identify authors of changes which introduced merge conflicts Scroll to the bottom, then for each file containing conflicts copy its path into the following searches: - https://github.com/dotnet/razor/find/release/dev17.12 - https://github.com/dotnet/razor/find/main Usually the most recent change to a file between the two branches is considered to have introduced the conflicts, but sometimes it will be necessary to look for the conflicting lines and check the blame in each branch. Generally the author whose change introduced the conflicts should pull down this PR, fix the conflicts locally, then push up a commit resolving the conflicts. ### Resolve merge conflicts using your local repo Sometimes merge conflicts may be present on GitHub but merging locally will work without conflicts. This is due to differences between the merge algorithm used in local git versus the one used by GitHub. ``` bash git fetch --all git checkout -t upstream/merges/release/dev17.12-to-main git reset --hard upstream/main git merge upstream/release/dev17.12 # Fix merge conflicts git commit git push upstream merges/release/dev17.12-to-main --force ```
* upstream/main: (71 commits) Fix after merge PR feedback Bump Roslyn version Moving formatting service to common layer (dotnet#10761) Move GetSyntaxTree to document snapshot Inject file path service into the document snapshot Remove code document parameter and just use document snapshot Update NOTICE.txt (dotnet#10768) Allow @@ as a fallback (dotnet#10752) Rework how we get generated documents Directly test the component definition service in cohosting Add missing test case Defer to C# for component attribute GTD in cohosting Allow LSP and cohosting to provide specialized methods to get a syntax tree for a C# document Dev Container (dotnet#10751) Use a proper Try pattern Add tests for co-hosted GTD Rework IDocumentPositionInfoStrategy and use correctly in co-hosted GTD Add DocumentMappingSerice to RazorDocumentServiceBase Move IDocumentPositionInfoStrategy and friends to Workspaces layer ...
CSharpCodeBlock - [3..36)::33 | ||
CSharpStatementLiteral - [3..34)::31 - [ var validationMessage = new { ] - Gen<Stmt> | ||
Whitespace;[ ]; | ||
Keyword;[var]; |
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.
Identifier->Keyword
CSharpCodeBlock - [3..117)::114 | ||
CSharpStatementLiteral - [3..77)::74 - [ var validationMessage = @Html.ValidationMessage(Model.Binding, "", new { ] - Gen<Stmt> | ||
Whitespace;[ ]; | ||
Keyword;[var]; |
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.
Identifier->Keyword
@@ -4,7 +4,6 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Diagnostics; | |||
using System.IO; |
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.
There was conflict here that needed to be fixed up by removing System.IO.
Minor touchup of usings and baselines necessary, no functional changes.