Skip to content
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' into ParamsCollections #72390

Merged

Conversation

AlekseyTs
Copy link
Contributor

No description provided.

CyrusNajmabadi and others added 30 commits February 19, 2024 19:27
…vider.GetSymbolsAsync (dotnet#72157)

This method was individually adding items to an ArrayBuilder without it's size configured. Potential issues with the current approach:

1) There could be multiple resizes during the Add calls to get the array to it's final size
2) Very likely the final capacity will exceed the array size, causing an allocation in generating the immutablearray.
3) I was seeing a large number of items in these arrays, causing the array that does get created not to get freed back into the pool.

Instead, if we use the SelectAsArray method, we shouldn't have any extra allocations other than the resultant ImmutableArray.
* Fix rethrowing in nested async catch

* Test await using and foreach
Razor is doing work to consolidate assemblies, and it's necessary to
add a couple more IVTs from the Razor EA assembly. In addition, I'm
removing an IVT for an assembly that no longer exists.
…ice` in `OnInitializedAsync()`.

- Add EA.Xaml reference to MS.CA.LanguageServer
ToddGrun and others added 15 commits February 29, 2024 17:17
…olsInternal (dotnet#72153)

During completion, I see this method generating results with several thousand entries which is evident in allocations in a profile I'm inspecting. This change reduces intermediary arrays constructed during that process by modifying FilterNotReferenceable and FilterOverriddenOrHiddenIndexers to not require realization of an ImmutableArray as input.
…72350)

This was expressing itself as instability in unit tests. The underlying issue (that Sam found!) was that the CreateCompilationTrackerMap was recently modified such that it dereferenced _projectIdToTrackerMap several times. Unfortunately, this value can be changed during this method's execution, so there was no guarantee that all dereferences were using the same object. The primary fix here is to use a local that guarantees they all use the same object.

Without this change, I would hit several failures in TestCommitAfterEnterOnBlankLine when running the test locally several thousand times. With this change, I no longer hit a failure when running the test locally 10K times.

There are a couple other small changes that Sam suggested as part of this PR, primarily being a bit more precise in the callback's return value indicating whether the trackermap was modified.
…t#72313)

Ensure ProjectState modification operations would actually create a modified ProjectState before creating the new ProjectState

When opening Roslyn.sln, I see 32800 ProjectState.AddDocument calls, of which 6700 are sending in an empty array to add. Similarly, I see 6700 ProjectState.RemoveAllDocuments calls, of which 4700 are called on ProjectState instances where the DocumentStates/AdditionalDocumentStates/AnalyzerConfigDocumentStates are all empty.
Boxing of the EntryState enum shows up in the RichCopyTest.CopyPlain test numbers as almost 1% of allocations. This code just needs to map EntryState values to a character for packing.
Lexer.LexDirectiveTrailingTrivia was calling into AddTrivia with a null SyntaxListBuilder, causing allocations. Instead, use a new member for use in that context.
UsingToolNetFrameworkReferenceAssemblies got removed from Arcade a while ago as the SDK supports that natively.
@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler Need a sign-off on a merge PR. Trivial merges

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Mar 5, 2024
@jjonescz
Copy link
Member

jjonescz commented Mar 5, 2024

Looks like correctness fails with:

Checking BoundNodes.xml.Generated.cs
Checking CSharp.Generated.g4
Checking ErrorFacts.Generated.cs
Files are out of date
Run D:\a\_work\1\s\eng\generate-compiler-code.ps1 to refresh
Files are out of date

@AlekseyTs AlekseyTs enabled auto-merge March 5, 2024 13:09
@AlekseyTs AlekseyTs merged commit 811c275 into dotnet:features/ParamsCollections Mar 5, 2024
25 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - ParamsCollections untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.