Repository navigation
Merge/sonic into main - #84778
Merged
Merged
Merge/sonic into main#84778
Conversation
This is a smaller subset of dotnet#83681 that stops at the point where we are generating the decl file, but not yet generating the impl file, or replacing the regular C# file with it. It has a couple of new tests with baselines that show the state of the decl doc. Once we have this in, we can add the commits that switch over to generating the impl docs, and flesh out how the tooling works with multiple files.
Sonic 3.2: activate the decl/impl split. Follows on from dotnet#83688 (Sonic 3.1: Generate Decl Files), which only landed the infrastructure to produce a second (decl) C# document. This PR brings over the remaining commits from the original work branch that switch the Razor files supporting the split from emitting a single `main` document to emitting an `impl` document alongside the `decl` document, and updates tooling/tests to be aware of the split. `backup/sonic-3.2-with-baselines` (sha `997fdab148f`) and will be re-applied before this work ships. 1. `Activate the decl/impl split in the lowering phase and source generator` -- turns on the split in the lowering pipeline and wires up the source generator to emit both documents. 2. `Make IDE/cohosting mapping layer split-aware` -- updates `RemoteDocumentMappingService` / `RemoteSpanMappingService` and related extensions so source mappings consider both documents. 3. `Make integration test infrastructure split-aware` -- updates `IntegrationTestBase` / `RazorBaselineIntegrationTestBase` / `RazorIntegrationTestBase` to handle decl + impl baselines. 4. `Update tests for the decl/impl split` -- updates `ComponentCodeGenerationTestBase` and related compiler tests.
I think it's 50/50 whether these helpers make it to the main branch, but for now it's really convenient to be able to obsolete all of the old methods, and be able to see which code has been modified to be explicit, and which are just using the old methods. I realise, in hindsight, that it was my own comment on a previous PR that caused things to be in this state 🤦♂️
…e end mapped result
Every consumer immedately converted to an array anyway
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…t#83989) First cab off the rank for tooling support for Project Sonic. I'm not 100% on the APIs here but given its going to a feature branch I think it's better to get some things working and see what the most useful API is as it emerges. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/roslyn/pull/83989)
Co-authored-by: David Wengier <david.wengier@microsoft.com>
…nd of sanity (dotnet#84008) This is my best bet at how to make Sonic Tooling dev approachable. It has no impact on CI builds, we'll have to remove it before merging to main (if I understand how PROTOTYPE comments work properly), but by setting a local define, I get a nice todo list from the error list about what needs to be fixed. I also found a few methods that had no callers when I was making these changes, so I removed them. Less surface area to worry about is good. As part of de-obsoleting everything at the end of the work, I'm open to removing the methods that take booleans, and switching to the document specific methods, or keeping both sets. Certainly, the boolean option is proving useful in porting other features. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/roslyn/pull/84008)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
May as well do this in the feature branch, since doing it in main would be conflict city
This is going to be generally useful in future
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Closed
davidwengier
approved these changes
Aug 6, 2026
The fallback-component nested-delegate metadata limitation is tracked as a known issue, so the skipped test carries only the issue reference rather than a temporary marker. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8188d9c-18d2-4e12-8b25-4c8d99114193
davidwengier
approved these changes
Aug 6, 2026
Member
JoeRobich
pushed a commit
that referenced
this pull request
Aug 11, 2026
Backs the `features/sonic` decl/impl split out of `main` to unblock insertion. Reverts the merge (#84778) and the commits that stacked on top of it and cannot stand without it. ## What reverts - **#84778** `Merge/sonic into main` -- the whole feature body (reverted with `-m 1`, keeping pre-sonic `main`). - **#84818** fallback child-content discovery fix -- patches sonic's fast/slow discovery, which no longer exists. - **#84813** restore `GetCSharpDocument()`/`GeneratedCode` -- these were re-added to shim sonic's API removal; reverting the merge restores the originals, so the shim would double-define them. - **#84795** always pass C# formatting options -- edits `CSharpFormattingOptionsHelper.cs`, a file that only exists because of sonic. ## What is kept The other post-merge commits are independent of sonic and stay: arcade bumps, SDL param removal, CS8802, #84758 (syntax-tree sharing), and the two Razor features that merely shared files -- **#84760** (unbound-attribute warnings) and **#84764** (empty-outer-tag warning). Preserving #84760 needed one manual resolution in `UnresolvedAttributeIntermediateNode.cs`: sonic added the `CloneNode()`/`Clone()` overrides and #84760 later added one property assignment inside `CloneNode`. The overrides are sonic infrastructure and go with the revert; #84760's `IsDirectiveAttributeCandidate` property and all its real usages are untouched. ## Validation - `Razor.slnf` builds clean (compiler + all tooling projects, including the ones #84795 touched). - `Microsoft.NET.Sdk.Razor.SourceGenerators.UnitTests`: 215 passed. - `Microsoft.AspNetCore.Razor.Language.UnitTests` (component / tag helper / bind / unbound-attribute): 1593 passed -- confirms #84760's kept feature still works. ## Note Reverting the merge means re-landing `features/sonic` later will need this revert itself reverted first -- expected for a back-out. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/roslyn/pull/84831)
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.

Microsoft Reviewers: Open in CodeFlow