Skip to content

[SDK] Add test verifying no fast path evaluators are not needed by SDK #10406

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

Closed
JanKrivanek opened this issue Jul 18, 2024 · 0 comments · Fixed by dotnet/sdk#48475
Closed

[SDK] Add test verifying no fast path evaluators are not needed by SDK #10406

JanKrivanek opened this issue Jul 18, 2024 · 0 comments · Fixed by dotnet/sdk#48475

Comments

@JanKrivanek
Copy link
Member

Context

related #10398

MSBuild evaluator has so called 'fast path' for the property functions evaluation:

private bool TryExecuteWellKnownFunction(out object returnVal, object objectInstance, object[] args)

Not being on the fast path means a fallback to a reflection need which makes the call more expensive. We should make sure that for common usage patterns (creating/building/publishing new console/web app) do not need any property functions that are not on the 'fast path'

Goal

Integration test(s) in dotnet/sdk repo (we need it there to catch the regressions early on) that turns on MSBuildLogPropertyFunctionsRequiringReflection=true and verifies that no functions are being required.
We should be able to use DotnetNewCommand and DotnetBuildCommand to auther the test(s). Inspiration:

https://github.com/dotnet/sdk/blob/18985b172e4ed14fa4bb5c2056eae9c65bdac538/test/dotnet-new.Tests/WebProjectsTests.cs#L36-L67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants