-
Notifications
You must be signed in to change notification settings - Fork 196
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 #10724
Merge main to tokenizer branch #10724
Commits on Jul 5, 2024
-
Update version of system.security.cryptography.xml in use in 17.10 (d…
…otnet#10525) Analogous to !10464
Configuration menu - View commit details
-
Copy full SHA for 459fb2a - Browse repository at this point
Copy the full SHA 459fb2aView commit details
Commits on Jul 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5191c83 - Browse repository at this point
Copy the full SHA 5191c83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e4cf07 - Browse repository at this point
Copy the full SHA 6e4cf07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2437736 - Browse repository at this point
Copy the full SHA 2437736View commit details -
Create isolated workspaces in case tests overlap
This was done because originally with inlay hints I was changing global options in Roslyn, but ended up moving away from that. Still makes sense though.
Configuration menu - View commit details
-
Copy full SHA for f179fb9 - Browse repository at this point
Copy the full SHA f179fb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a21f34 - Browse repository at this point
Copy the full SHA 3a21f34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 51756c1 - Browse repository at this point
Copy the full SHA 51756c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed53daf - Browse repository at this point
Copy the full SHA ed53dafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fe459e - Browse repository at this point
Copy the full SHA 0fe459eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 08f7362 - Browse repository at this point
Copy the full SHA 08f7362View commit details
Commits on Jul 26, 2024
-
Fix excerpt service to allow for multi line verbatim strings that kin…
…da are but kinda aren't supported in Razor
Configuration menu - View commit details
-
Copy full SHA for 40e409e - Browse repository at this point
Copy the full SHA 40e409eView commit details
Commits on Jul 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8806e92 - Browse repository at this point
Copy the full SHA 8806e92View commit details
Commits on Jul 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 88b3813 - Browse repository at this point
Copy the full SHA 88b3813View commit details -
Configuration menu - View commit details
-
Copy full SHA for db8eade - Browse repository at this point
Copy the full SHA db8eadeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f7545b - Browse repository at this point
Copy the full SHA 3f7545bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 02854ec - Browse repository at this point
Copy the full SHA 02854ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 227b0c9 - Browse repository at this point
Copy the full SHA 227b0c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a06fcc - Browse repository at this point
Copy the full SHA 2a06fccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 240a123 - Browse repository at this point
Copy the full SHA 240a123View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4f1677 - Browse repository at this point
Copy the full SHA e4f1677View commit details -
Configuration menu - View commit details
-
Copy full SHA for 788988b - Browse repository at this point
Copy the full SHA 788988bView commit details
Commits on Jul 31, 2024
-
Cohost inlay hint support (dotnet#10672)
Part of dotnet#9519 Needs dotnet/roslyn#74548 before it will compile Needs https://devdiv.visualstudio.com/DevDiv/_git/VSLanguageServerClient/pullrequest/567229 before it will work in VS There were a few side quests on this one: * Roslyn OOP, at least the way we access it, doesn't have any options set, so took a few tries to get the Roslyn side of this right for our needs * I wrote this feature test-first so only discovered the lack of options after I modified Roslyn and our test infra to allow us to set global options, so ended up removing most of that code, Kept the bit about isolated workspaces because it just makes sense. * Had to re-write one of the `DocumentMappingService` methods to use `TextChange` instead of `TextEdit` so I could use Roslyn LSP types * The hacky, and fortunately temporary, way we were doing generated C# content was causing cache misses in Roslyn in tests, so fixed that up * When I finally got up to manual testing I found a bug in the platform that meant inlay hints just don't work with dynamic registration, so filed the above linked PR to fix that If reviewing commit-at-a-time please note that the first commit was written before the reworking of extension methods and LSP types, and the fixes for that are in the last commit.
Configuration menu - View commit details
-
Copy full SHA for c78f5f2 - Browse repository at this point
Copy the full SHA c78f5f2View commit details
Commits on Aug 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4358b4c - Browse repository at this point
Copy the full SHA 4358b4cView commit details -
Merge release/dev17.10 to release/dev17.11 (dotnet#10587)
This is an automatically generated pull request from release/dev17.10 into release/dev17.11. 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.10 - https://github.com/dotnet/razor/find/release/dev17.11 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.10-to-release/dev17.11 git reset --hard upstream/release/dev17.11 git merge upstream/release/dev17.10 # Fix merge conflicts git commit git push upstream merges/release/dev17.10-to-release/dev17.11 --force ```
Configuration menu - View commit details
-
Copy full SHA for 78a398c - Browse repository at this point
Copy the full SHA 78a398cView commit details -
Merge release/dev17.11 to main (dotnet#10700)
This is an automatically generated pull request from release/dev17.11 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.11 - 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.11-to-main git reset --hard upstream/main git merge upstream/release/dev17.11 # Fix merge conflicts git commit git push upstream merges/release/dev17.11-to-main --force ```
Configuration menu - View commit details
-
Copy full SHA for 1764b62 - Browse repository at this point
Copy the full SHA 1764b62View commit details
Commits on Aug 5, 2024
-
Move down and interface-ize component search engine, and introduce IP…
…rojectCollectionResolver
Configuration menu - View commit details
-
Copy full SHA for 0f56e69 - Browse repository at this point
Copy the full SHA 0f56e69View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59e6260 - Browse repository at this point
Copy the full SHA 59e6260View commit details -
Move down and interface-ize component search engine, and introduce IP…
…rojectCollectionResolver (dotnet#10706) Started this for dotnet#10688 but saw that Go To Def used the same service, so figured @DustinCampbell would need to do the same thing, and thought it would be easier to put it up separately. (Unless of course you've already done this, or similar, Dustin in which case I can just abandon this, nbd)
Configuration menu - View commit details
-
Copy full SHA for 36542b2 - Browse repository at this point
Copy the full SHA 36542b2View commit details
Commits on Aug 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ea2e567 - Browse repository at this point
Copy the full SHA ea2e567View commit details -
This change updates `DocumentContext` is several ways: 1. Fields used for caching are now assigned with `Interlocked.Initialize(...)` to ensure that the same value are used in race scenarios. 2. All public async methods now return `ValueTask` rather than `Task`. This has lower overhead since the async methods will return synchronously after the first call. 3. Members are no longer virtual. This appears to have been originally done to allow `DocumentContext` to be mocked for tests, which isn't the right way to handle testing. Instead, since `DocumentContext` delegates its implementation to its `IDocumentSnapshot`, the snapshot should be mocked to change the implementation. 4. The Identifier property has been converted to a method, since it creates a new object every time.
Configuration menu - View commit details
-
Copy full SHA for a5ddcd7 - Browse repository at this point
Copy the full SHA a5ddcd7View commit details -
In order to remove `IDocumentContextFactory` from `AbstractRazorDocumentMappingService`, it's necessary to split `IRazorDocumentMappingService` into different services. The goal is to make `IRazorDocumentMappingService` provide APIs that only perform mapping using Roslyn primitives, such as `LinePosition`, `LinePositionSpan`, and `TextChange`. `IEditMappingService` contains an API moved from `IRazorDocumentMappingService` that remaps a `WorkspaceEdit`.
Configuration menu - View commit details
-
Copy full SHA for c0bc542 - Browse repository at this point
Copy the full SHA c0bc542View commit details -
Add RazorCodeDocument.TryGetGeneratedDocument(...) extension method
This allows `EditMappingService` and `AbstractRazorDocumentMappingService` to share a helper method.
Configuration menu - View commit details
-
Copy full SHA for d638bce - Browse repository at this point
Copy the full SHA d638bceView commit details -
Remove IDocumentContextFactory from AbstractRazorDocumentMappingService
This change removes `IDocumentContextFactory` from the `AbstracRazorDocumentMappingService` and replaces the single usage with a new protected abstract method.
Configuration menu - View commit details
-
Copy full SHA for 75e06cb - Browse repository at this point
Copy the full SHA 75e06cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3d9258 - Browse repository at this point
Copy the full SHA e3d9258View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3f3ac7 - Browse repository at this point
Copy the full SHA f3f3ac7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5dc280 - Browse repository at this point
Copy the full SHA d5dc280View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58161c0 - Browse repository at this point
Copy the full SHA 58161c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a550cbb - Browse repository at this point
Copy the full SHA a550cbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 655a88c - Browse repository at this point
Copy the full SHA 655a88cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20dd630 - Browse repository at this point
Copy the full SHA 20dd630View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc6aa07 - Browse repository at this point
Copy the full SHA fc6aa07View commit details
Commits on Aug 7, 2024
-
Move MapToHostDocuementUriAndRangeAsync to extension methods
This change also removes the `AbstractDocumentMappingService.TryGetCodeDocumentAsync(...)` method that was added in an an early commit.
Configuration menu - View commit details
-
Copy full SHA for 50a3d41 - Browse repository at this point
Copy the full SHA 50a3d41View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4a6932 - Browse repository at this point
Copy the full SHA e4a6932View commit details -
Configuration menu - View commit details
-
Copy full SHA for 358c2bf - Browse repository at this point
Copy the full SHA 358c2bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for a2c21cf - Browse repository at this point
Copy the full SHA a2c21cfView commit details -
Co-hosting: Add API for mapping a generated document URI and range ba…
…ck to the host document (dotnet#10712) There's a fair amount of refactoring here, but I was careful to separate everything. So, I recommend reviewing commit-by-commit.
Configuration menu - View commit details
-
Copy full SHA for fb84ae5 - Browse repository at this point
Copy the full SHA fb84ae5View commit details
Commits on Aug 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2c0e252 - Browse repository at this point
Copy the full SHA 2c0e252View commit details -
Don't pass code document and source text around in diagnostics transl…
…ator, plus some cleanup
Configuration menu - View commit details
-
Copy full SHA for 00e584a - Browse repository at this point
Copy the full SHA 00e584aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53ec3ab - Browse repository at this point
Copy the full SHA 53ec3abView commit details -
Make Compilation a TagHelperDescriptorProviderContext property
Every single `TagHelperDescriptorProviderContext` created in Razor compiler or tooling code adds a valid compilation. So, adding the compilation to the `ItemsCollection` is pure overhead and no `ITagHelperDescriptorProvider` needs to check it for null. I removed a single test that verified the behavior if a compilation was never set. Now that a compilation is required, this test is no longer needed.
Configuration menu - View commit details
-
Copy full SHA for adff92a - Browse repository at this point
Copy the full SHA adff92aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec5cd16 - Browse repository at this point
Copy the full SHA ec5cd16View commit details -
Remove TagHelperDescriptorProviderContext.Items property
This can be safely removed now that there are no more references.
Configuration menu - View commit details
-
Copy full SHA for 45625bc - Browse repository at this point
Copy the full SHA 45625bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9476634 - Browse repository at this point
Copy the full SHA 9476634View commit details -
Configuration menu - View commit details
-
Copy full SHA for eae0d53 - Browse repository at this point
Copy the full SHA eae0d53View commit details -
Clean up all ITagHelperDescriptorProviders a bit (and found a bug!)
- Enable nullability - Mark all as sealed - Use `Lazy<T>` for singleton `ITagHelperDescriptorProviders` - Introduce `TagHelperDescriptorProviderBase` - Inherit from `TagHelperDescriptorProviderBase` - Remove unnecessary properties - Remove unnecessary property setters In addition, I spotted a bug in `EventHandlerTagDescriptorProvider` while addressing nullability warnings. The buggy code is right here: https://github.com/dotnet/razor/blob/fb84ae5d9bb8132972c2c23cf209721161f81deb/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/CSharp/EventHandlerTagHelperDescriptorProvider.cs#L70-L76 When reading the constructor arguments of an `EventHandlerAttribute` it appears that we swap the last two arguments of the 4-argument variant. The constructor is defined like so: ```C# EventHandlerAttribute(string attributeName, Type eventArgsType, bool enableStopPropagation, bool enablePreventDefault); ``` Unfortunately, the compiler reads the third parameter as `enablePreventDefaeult` and the fourth parameter as `enableStopPropagation`. This has been broken since support for the 4-argument constructor variant was added in dotnet@7635bba. Fixing this bug is tracked by dotnet#10497.
Configuration menu - View commit details
-
Copy full SHA for 5fbfc0d - Browse repository at this point
Copy the full SHA 5fbfc0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f6c7b6 - Browse repository at this point
Copy the full SHA 9f6c7b6View commit details -
I spent 10 minutes looking up cool Mr Freeze catch phrases for this c…
…ommit message, and I didn't like any of them.
Configuration menu - View commit details
-
Copy full SHA for 79b2d26 - Browse repository at this point
Copy the full SHA 79b2d26View commit details -
Don't pass
RazorCodeDocument
andSourceText
around together (dotn……et#10719) because it's really easy to get one from the other. While working on rename in cohosting, I noticed this unnecessary extra bit of work while calling `GetPositionInfo`, so I fixed it. Then I thought I'd see where else `GetSourceTextAsync` was used in an non-ideal way, and that was clearly going to be too big for the rename PR so I separated it out into it's own PR. Then I heard Dustin say he was changing `DocumentSnapshot` so the unnecessary work will end up being much less wasteful anyway, plus we'd probably just have conflicts, so I pared the whole thing right back to just this minor removal of a couple of unnecessary parameters. Enjoy.
Configuration menu - View commit details
-
Copy full SHA for d5cfe11 - Browse repository at this point
Copy the full SHA d5cfe11View commit details
Commits on Aug 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4441e1d - Browse repository at this point
Copy the full SHA 4441e1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed8dcee - Browse repository at this point
Copy the full SHA ed8dceeView commit details -
Move to central package pinning (dotnet#10716)
* Move to central package pinning This should make it much easier for us to respond to CG alerts in the future. All that will need to be done is add an entry in Directory.Packages.props and it will automatically impact all consumers of it. Consider this example in Roslyn for how to respond to a CG issue dotnet/roslyn#74653
Configuration menu - View commit details
-
Copy full SHA for cd1f82b - Browse repository at this point
Copy the full SHA cd1f82bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9044af2 - Browse repository at this point
Copy the full SHA 9044af2View commit details
Commits on Aug 12, 2024
-
Remove ItemCollection from TagHelperDescriptorProviderContext (dotnet…
…#10720) Every `TagHelperDescriptorProviderContext` creates an `ItemCollection` to hold onto, at most, two objects: a `Compilation` and a target `ISymbol`. This is enormously wasteful because an `ItemCollection` internally creates a `ConcurrentDictionary<object, object>`. So, I've changed `TagHelperDescriptorProviderContext` to just hold onto a compilation and a target symbol and avoid the `ItemCollection` altogether. I recommend reviewing commit-by-commit. Also, I bumped into a long standing compiler bug in `EventHandlerTagHelperDescriptorProvider` that was recently filed by a customer: dotnet#10497. I opted to stay on target and not fix this issue, but I made it painfully obvious where the fix would go. 😄
Configuration menu - View commit details
-
Copy full SHA for 3920563 - Browse repository at this point
Copy the full SHA 3920563View commit details -
Merge remote-tracking branch 'upstream/main' into features/roslyn-tok…
…enizer * upstream/main: (53 commits) Move to central package pinning (dotnet#10716) Try to fix rename tests Unskip rename tests I spent 10 minutes looking up cool Mr Freeze catch phrases for this commit message, and I didn't like any of them. Clean up CompilationTagHelperResolver Clean up all ITagHelperDescriptorProviders a bit (and found a bug!) Make ExcludeHidden and IncludeDocumentation init-only properties Swap TagHelperDescriptorProviderContext.Create methods for constructors Remove TagHelperDescriptorProviderContext.Items property Make TargetSymbol a TagHelperDescriptorProviderContext property Make Compilation a TagHelperDescriptorProviderContext property Merge TagHelperDescriptorProviderContext and DefaultContext Don't pass code document and source text around in diagnostics translator, plus some cleanup Remove unnecessary parameter, because it can be trivially retrieved Find razor document correctly in RemoveDocumentMappingService Add extension methods that convert URIs to Roslyn file paths Use Uri.LocalPath rather than GetAbsoluteOrUNCPath() Move MapToHostDocuementUriAndRangeAsync to extension methods Fix small typo in comment Remove unused DocumentState method ...
Configuration menu - View commit details
-
Copy full SHA for 711bda8 - Browse repository at this point
Copy the full SHA 711bda8View commit details