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

Rendermode main #9274

Merged
merged 205 commits into from
Sep 12, 2023
Merged

Rendermode main #9274

merged 205 commits into from
Sep 12, 2023

Conversation

chsienki
Copy link
Contributor

@chsienki chsienki commented Sep 12, 2023

Merges main into the feature branch.

Merge was mostly clean, just combining the rendermode and formname additions. I've added comments to the less obvious merge resolutions (diagnostic numbers and a parsing fix), but it was generally very simple.

lonitra and others added 30 commits July 27, 2023 15:16
…) (dotnet#9035)

* Remove async keyword from generate async method

* Ensure namespace for code behind tests is correct
As usual, the Html formatter is doing the right thing here, and our C# adjustments then break things. Essentially it sees `@bind` as a Razor directive, so wants it at column 0. This change simply makes the `@` on an attribute pretend to be Html, so the C# formatter leaves it alone.
Waiting for the Workspace just means waiting for the project system, and everywhere that did it already had a wait for that anyway.
The FeatureAttribute system was wholesale copied from Roslyn, but we lack the mechanisms to use it, and likely always will
…825.2

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23422.1 -> To Version 8.0.0-beta.23425.2

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23418.1 -> To Version 1.0.0-beta.23423.1 (parent: Microsoft.DotNet.Arcade.Sdk
…ge-fault

Rework BoundAttributeDescriptionInfo to avoid failures due to unexpected inputs
davidwengier and others added 18 commits September 9, 2023 11:04
…ence-packages build 20230907.1

Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 8.0.0-alpha.1.23451.1 -> To Version 8.0.0-alpha.1.23457.1
This PR should improve the performance of communication with the Roslyn
OOP and significantly reduce allocations. It does this by making the
following changes:

* Communication with Roslyn OOP now uses MessagePack rather than
Json.NET for serialization. Once MessagePack was enabled, I found that
the MessagePack formatters weren't working correctly and needed to be
reworked.
* The Razor MessagePack formatters expend some effort to dedupe strings
and MetadataCollection instances. More work can be done here in the
future if needed.
* Tag helpers are now cached in tooling by checksum and are weakly
referenced by the cache. The cache implements a simple mechanism to
remove dead references over time.
* When a request is made to Roslyn OOP for the delta of tag helpers
since the last request, the changes are returned as checksum. This
avoids loads of extra work to serialize all the tag helpers, which is
unnecessary if they've already been seen and cached.
* In the case that a tag helper has not been seen yet, a new API
(`FetchTagHelpersAsync`) has been added to request tag helpers from
Roslyn OOP by checksum. The same caching mechanism is used in Roslyn OOP
to ensure that this method doesn't have to re-compute tag helpers again.

In addition, I've done work in this change to clean up code that is no
longer needed. In particular, all of the JsonConverters (except for one
in `Microsoft.VisualStudio.LiveShare.Razor`) have been deleted.

@dotnet/razor-compiler: The only compiler-level change is an additional
`HashCodeCombiner.Add(...)` overload that takes an `ImmutableArray<T>`.

@davidwengier: This changes the project.razor.json format by replacing
the old hash codes with checksums. So, this will require an insertion
for VS Code.
dotnet#9268)

This pull request updates the following dependencies

[marker]: <> (Begin:011df26a-fbd1-45b0-94b9-08db3601dcca)
## From https://github.com/dotnet/source-build-reference-packages
- **Subscription**: 011df26a-fbd1-45b0-94b9-08db3601dcca
- **Build**: 20230907.1
- **Date Produced**: September 7, 2023 9:11:09 PM UTC
- **Commit**: 18302345498a62222dd3c236b3d1d140dbaed43d
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
-
**Microsoft.SourceBuild.Intermediate.source-build-reference-packages**:
[from 8.0.0-alpha.1.23451.1 to 8.0.0-alpha.1.23457.1][1]

[1]:
dotnet/source-build-reference-packages@0030d23...1830234

[DependencyUpdate]: <> (End)


[marker]: <> (End:011df26a-fbd1-45b0-94b9-08db3601dcca)
@chsienki chsienki changed the base branch from main to features/rendermode September 12, 2023 18:07
var diag = Assert.Single(generated.Diagnostics);
Assert.Equal("RZ10021", diag.Id);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed diagnostics numbers


public static readonly RazorDiagnosticDescriptor Attribute_ValidOnlyOnComponent =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}10023",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated diagnostic numbers

@@ -1574,7 +1574,7 @@ private void ParseExtensibleDirective(in SyntaxListBuilder<RazorSyntaxNode> buil
RazorDiagnosticFactory.CreateParsing_DirectiveExpectsIdentifierOrExpression(
new SourceSpan(CurrentStart, identifierLength), descriptor.Directive));

builder.Add(BuildDirective());
builder.Add(BuildDirective(SyntaxKind.Identifier));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix parsing conflict

@chsienki
Copy link
Contributor Author

@dotnet/razor-compiler for review please :)

@chsienki chsienki marked this pull request as ready for review September 12, 2023 18:55
@chsienki chsienki requested review from a team as code owners September 12, 2023 18:55
@chsienki chsienki merged commit 4258f88 into dotnet:features/rendermode Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.