Merged
Conversation
Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>
… acronym Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>
…irectory location, fix resource extraction guidance Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>
Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>
Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>
…solete" This reverts commit 40dd749.
… Build ID 2885645
… Build ID 2885645
… Build ID 2887188
… Build ID 2887188
… Build ID 2888011
The build stage fails if restarted because artifacts must have a unique name.
…net#82134) This makes razor C# completions sort much more similarly to how C# completions sort in .cs files. (Note that we still have the nuint/null selection issue, that is covered by dotnet/razor#12483 which is how I found this issue) *** .cs behavior *** <img width="653" height="521" alt="image" src="https://github.com/user-attachments/assets/28e338f8-bdcf-4694-8724-482b59daf374" /> *** old razor behavior *** <img width="442" height="471" alt="image" src="https://github.com/user-attachments/assets/4729de85-f0fc-4fbc-8b91-1b4300577be1" /> *** new razor behavior *** <img width="430" height="447" alt="image" src="https://github.com/user-attachments/assets/72aa5244-a7be-41b8-adf5-80d4785678d0" />
Fixes dotnet#81535 The rename dialog stopped displaying conflict warnings when renaming an identifier that conflicted with an existing symbol. In `OnReplacementsChanged` the conflict detection was inside a block that only executes when the validity state changes, which it does not between two valid identifiers.
1) Use discardLargeInstances in ArrayBuilder usage as the matchResultsBuilder array can typically be 1000 entries long which exceeds the ArrayBuilder.PooledArrayLengthLimitExclusive threshold. 2) Replace Linq usage in the method to get rid of some enumerator allocs. 3) Get rid of the SelectAsArray usage, as again, it would end up using an ArrayBuilder that exceeds the ArrayBuilder.PooledArrayLengthLimitExclusive threshold. Validation PR didn't show a big improvement, but looking at the Razor C# completion scenario, it only tests bringing up completion inside a using statement. That isn't a scenario where there are a large number (> 1000) of completion items, and thus not a scenario which would hit this codepath. This PR improves allocations in less restrictive completion contexts (ie, typing in a context where accessible types are in the list).
Implements suggestion from [dotnet#82348 (review)](dotnet#82348 (comment)) to use `Environment.Exit()` with documented exit codes instead of `Process.GetCurrentProcess().Kill()`. **Changes:** - Added `ServerExitCodes.cs` defining exit code constants with XML documentation - Updated `RoslynLanguageServer.WaitForClientProcessExitAsync()` to use `Environment.Exit(ServerExitCodes.ClientProcessExited)` Exit code 1 now indicates the server terminated because the monitored client process exited, making debugging easier. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JoeRobich <611219+JoeRobich@users.noreply.github.com>
Editor recently added context menu to the left margin that allows users show/hide individual margins. This PR adds inheritance margin to this menu: <img width="764" height="334" alt="image" src="https://github.com/user-attachments/assets/c60af46b-dcf1-4898-92e4-555149903b9f" />
… Build ID 2908364
…ruct receivers (dotnet#82432) - When calling base class virtual methods (e.g., `ToString()`, `GetHashCode()`, `Equals()`) on readonly struct receivers via `constrained. callvirt`, the compiler previously used `AddressKind.Writeable` for the receiver address - This caused unnecessary defensive copies when the receiver was in a readonly context (e.g., a field accessed through a readonly method's `this`, or a direct `this` reference in a readonly struct method) - Since readonly structs guarantee non-mutation for all their methods, and constrained calls either resolve to a non-mutating method or box the value (which copies it), the original receiver is never mutated - Changed to use `AddressKind.ReadOnly` for readonly value type receivers, eliminating the defensive copy Fixes dotnet#76288 Closes dotnet#66365
… Build ID 2908880
… Build ID 2908880 (dotnet#82468) This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
…ly. (dotnet#82431) # NavigateTo: Add document pre-filtering to skip non-matching files early ## Summary Adds a new lightweight `NavigateToSearchIndex` that lets NavigateTo skip documents that can't match the user's query — without ever loading the full declared-symbol data. For documents that pass, the filter also controls whether fuzzy matching is enabled, avoiding expensive edit-distance work when no symbol is close in length. Speedup is anywhere from 15,000x better in the worst case, to 250,000x better in the best case. This is for when we can filter the doc out. When we can't filter the doc out, we spend at worst 300ns on an initial check, which is then dwarfed by millions of ns of actual searching cost. So there's no appreciable cost for documents where there is a hit. The worst case (only 15,000x speedup) is for users with an all-lowercase NavTo pattern (sorry @dibarbet). Users with any capital letters in their pattern will get the 250,000x improvement. ## Why Today NavigateTo loads the full `TopLevelSyntaxTreeIndex` for every document and runs `PatternMatcher` against every symbol. Most documents don't match, so this is wasted work. By putting a small pre-filter in a separate, independently-loaded index, we can reject the vast majority of documents for the cost of loading a few bloom filters and frozen sets. ## Two-index architecture `NavigateToSearchIndex` extends `AbstractSyntaxIndex` and is persisted/loaded independently from `TopLevelSyntaxTreeIndex`. The search pipeline becomes: 1. Load `NavigateToSearchIndex` (tiny: bloom filters, frozen sets, a 64-bit bitset). 2. If the filter rejects, skip — never load `TopLevelSyntaxTreeIndex`. 3. On pass, load `TopLevelSyntaxTreeIndex` (large: all `DeclaredSymbolInfo`s) and do real matching. Both indices are built from the same syntax tree walk but stored separately. Both search paths (in-process and cached/pre-solution-load) follow this pattern. ## Filter data Five pieces of data per document: | Filter | Type | Purpose | |---|---|---| | **Hump set** | `FrozenSet<string>` | Hump initials + ordered bigrams. Rejects mixed-case CamelCase queries like `GB`, `WrLi`. | | **Hump prefix filter** | `BloomFilter` | Lowercased hump prefixes. Handles all-lowercase queries like `wrli` via a DP pass. | | **Trigram filter** | `BloomFilter` | 3-char sliding windows. Rejects substring queries like `line`. | | **Container char set** | `FrozenSet<char>` | Container hump initials. Rejects container-qualified queries. | | **Length bitset** | `ulong` | Which symbol name lengths exist. Gates fuzzy matching (±2). | The hump set and container set use exact `FrozenSet`s — the domain is small (for English: ~700 hump strings, a handful of container chars; Unicode adds more but it stays bounded by actual document content). Bloom filters are used for hump prefixes and trigrams where the domain is unbounded. ### Key design choices **Bigrams over single chars**: Storing ordered pairs of hump initials (`GB`, `GQ`, `BQ` for `GooBarQuux`) is far more selective than single characters. A lone `G` would match too many documents. **DP for all-lowercase**: Instead of enumerating 2^n capitalizations, we store lowercased hump prefixes and run an O(n × max_hump_length) DP to check if the pattern can be split into valid hump prefixes. Inspired by the [Metals bloom filter approach](https://scalameta.org/metals/blog/2019/01/22/bloom-filters/). **Split fuzzy signal**: `ProbablyContainsMatch` returns both "should we search?" and "should we allow fuzzy?" separately. When no symbol has a name length within ±2, fuzzy matching is disabled for that document. ## Testing >300 unit tests in `NavigateToSearchIndexTests` cover each filter individually (including guaranteed-rejection cases for exact sets, cross-symbol behavior, the DP break optimization) and the top-level `ProbablyContainsMatch` entry point (cross-validated against `PatternMatcher`). 5 integration tests in `NavigateToTests.cs` exercise the full pipeline. ## Benchmark BenchmarkDotNet micro-benchmarks for many scenarios. | Method | Mean | Error | StdDev | Ratio | Gen 0 | Gen 1 | Gen 2 | Allocated | |--------------------------------------------- |----------------:|---------------:|--------------:|------:|------:|------:|------:|----------:| | 'FullScan (10k symbols, no pre-filter)' | 4,679,488.12 ns | 253,728.513 ns | 39,264.768 ns | 1.000 | - | - | - | 320 B | | 'Realistic: CamelCase miss' | 19.44 ns | 0.736 ns | 0.191 ns | 0.000 | - | - | - | - | | 'Realistic: CamelCase hit' | 22.17 ns | 1.971 ns | 0.305 ns | 0.000 | - | - | - | - | | 'Realistic: lowercase hit (hump-prefix DP)' | 299.48 ns | 12.928 ns | 2.001 ns | 0.000 | - | - | - | - | | 'Realistic: lowercase miss (hump-prefix DP)' | 147.36 ns | 3.946 ns | 1.025 ns | 0.000 | - | - | - | - | | 'Realistic: lowercase trigram hit' | 185.78 ns | 4.812 ns | 0.745 ns | 0.000 | - | - | - | - | | 'Realistic: CamelCase trigram hit' | 20.72 ns | 2.973 ns | 0.772 ns | 0.000 | - | - | - | - | | 'Realistic: lowercase trigram miss' | 154.92 ns | 9.421 ns | 2.447 ns | 0.000 | - | - | - | - | | 'Realistic: CamelCase trigram miss' | 17.21 ns | 0.157 ns | 0.024 ns | 0.000 | - | - | - | - | | 'Realistic: container hit' | 40.27 ns | 2.326 ns | 0.604 ns | 0.000 | - | - | - | - | | 'Realistic: container miss' | 33.53 ns | 1.688 ns | 0.438 ns | 0.000 | - | - | - | - | | 'Realistic: lowercase verbatim hit' | 299.95 ns | 9.907 ns | 2.573 ns | 0.000 | - | - | - | - | | 'Realistic: CamelCase verbatim hit' | 23.09 ns | 1.002 ns | 0.155 ns | 0.000 | - | - | - | - | | 'Realistic: lowercase multi-word hit' | 238.93 ns | 8.594 ns | 1.330 ns | 0.000 | - | - | - | - | | 'Realistic: CamelCase multi-word hit' | 34.16 ns | 2.226 ns | 0.578 ns | 0.000 | - | - | - | - | | 'StressAll: hit' | 21.53 ns | 1.637 ns | 0.425 ns | 0.000 | - | - | - | - | | 'StressAll: miss' | 21.24 ns | 0.560 ns | 0.146 ns | 0.000 | - | - | - | - | | 'StressHumpSet: CamelCase hit' | 21.10 ns | 1.054 ns | 0.274 ns | 0.000 | - | - | - | - | | 'StressHumpSet: CamelCase miss' | 21.10 ns | 1.152 ns | 0.299 ns | 0.000 | - | - | - | - | | 'StressHumpPrefix: lowercase hit' | 186.21 ns | 9.798 ns | 1.516 ns | 0.000 | - | - | - | - | | 'StressHumpPrefix: lowercase miss' | 219.83 ns | 3.192 ns | 0.829 ns | 0.000 | - | - | - | - | | 'StressTrigram: lowercase hit' | 177.90 ns | 2.970 ns | 0.771 ns | 0.000 | - | - | - | - | | 'StressTrigram: lowercase miss' | 156.88 ns | 3.827 ns | 0.994 ns | 0.000 | - | - | - | - | | 'StressContainer: container hit' | 29.41 ns | 1.238 ns | 0.322 ns | 0.000 | - | - | - | - | | 'StressContainer: container miss' | 32.27 ns | 1.977 ns | 0.513 ns | 0.000 | - | - | - | - | ``` dotnet run --project src/Tools/IdeCoreBenchmarks/IdeCoreBenchmarks.csproj -f net10.0 -c Release -- --filter '*PreFilter*' ``` --------- Co-authored-by: Cyrus Najmabadi <Cyrus Najmabadi> Co-authored-by: Cursor <cursoragent@cursor.com>
…82395) Fixes dotnet#81984 Removes duplicated errors on ambiguous user defined conversions
… Build ID 2910797
… Build ID 2910797
Co-authored-by: Joey Robichaud <jorobich@microsoft.com>
to make sure we're talking about the same things
… Build ID 2910926 (dotnet#82497) This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
…o .NET 10 (dotnet#82486) Co-authored-by: Joey Robichaud <joseph.robichaud@microsoft.com>
…dotnet#82404) When runtime async methods were lifted to closure methods (such as when nested inside a non-runtime async lambda), they were incorrectly leaving off `IsRuntimeAsyncEnabledIn`. We need to pass that through to get the right values. Fixes dotnet#82397. Test plan dotnet#75960.
…ase/insiders is entirely discarded
Contributor
|
This PR modifies public API files. Please follow the instructions at https://github.com/dotnet/roslyn/blob/main/docs/contributing/API%20Review%20Process.md for ensuring all public APIs are reviewed before merging. |
JoeRobich
approved these changes
Feb 24, 2026
JoeRobich
reviewed
Feb 24, 2026
| "vsBranch": "main", | ||
| "insertionCreateDraftPR": false, | ||
| "insertionTitlePrefix": "[Insiders]" | ||
| "insertionTitlePrefix": "[InsidersVNext]" |
Member
There was a problem hiding this comment.
Any benefit to using the VS version here?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.