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

Use Basic.Reference.Assemblies in Mvc Extension tests #10888

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

jjonescz
Copy link
Member

Resolves #10343.

@jjonescz jjonescz added the area-compiler Umbrella for all compiler issues label Sep 16, 2024
@@ -60,7 +60,7 @@ private static IEnumerable<string> ResolvePaths(CompilationLibrary library)
public static string AssemblyName => "TestAssembly";

// When we use Basic.Reference.Assemblies everywhere, this overload should be removed.
// Tracked by https://github.com/dotnet/razor/issues/10343.
// See also https://github.com/dotnet/razor/issues/10343.
public static CSharpCompilation Create(Assembly assembly, SyntaxTree syntaxTree = null)
Copy link
Member Author

@jjonescz jjonescz Sep 16, 2024

Choose a reason for hiding this comment

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

This is still used by Version1_X and Version2_X of the Mvc tests. I don't think I can easily change those because I would need Basic.Reference.Assemblies for AspNetCore 1.0 and 2.0 which might be difficult to create.

Copy link
Member

Choose a reason for hiding this comment

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

That doesn't mean we can't try to nerd snipe @jaredpar with it.

Copy link
Member

Choose a reason for hiding this comment

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

The official reference assemblies only go back to 3.0.

https://www.nuget.org/packages/Microsoft.AspNetCore.App.Ref/

Do we know where the 1.0 / 2.0 ref assemblies are? If there is an official copy somewhere could consider taking an approach like we did with netstandard1.3? Basically just create the correct set on disk, check them in as resources and build a basci ref pack for that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well there are many Microsoft.AspNetCore.* package stuck at version 2.2.0, e.g., https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc. They are the full dlls, not just ref dlls, I'm not sure if ref dlls were published at the time.

Copy link
Member Author

Choose a reason for hiding this comment

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

The ref assemblies bring in <head> and <body> tag helpers that aren't in the shims, hence the baseline changes in this test.

@jjonescz jjonescz marked this pull request as ready for review September 16, 2024 12:51
@jjonescz jjonescz requested review from a team as code owners September 16, 2024 12:51
Copy link
Member

Choose a reason for hiding this comment

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

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-compiler Umbrella for all compiler issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to Basic.Reference.Assemblies
5 participants