Skip to content

Adding target framework intrinsic functions#5234

Merged
rainersigwald merged 6 commits into
dotnet:masterfrom
sfoslund:TFMFunctions
Jun 10, 2020
Merged

Adding target framework intrinsic functions#5234
rainersigwald merged 6 commits into
dotnet:masterfrom
sfoslund:TFMFunctions

Conversation

@sfoslund
Copy link
Copy Markdown
Member

@sfoslund sfoslund commented Apr 3, 2020

Implementing the first few intrinsic properties from #5171

@sfoslund
Copy link
Copy Markdown
Member Author

sfoslund commented Apr 3, 2020

@rainersigwald this will add a dependency on nuget. Do you have guidance on how to get that hooked up properly?

Copy link
Copy Markdown
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

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

Looks good to me. Mostly curious about the tests.

Comment thread src/Build.UnitTests/Evaluation/Expander_Tests.cs Outdated
Comment thread eng/Packages.props Outdated
Copy link
Copy Markdown
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

Looks good. VS and assembly-reference consistency will be a mess that might require a fairly big change in approach; let's take that one step at a time.

Comment thread src/Build/Evaluation/IntrinsicFunctions.cs Outdated
Comment thread eng/Packages.props Outdated
Comment thread eng/Packages.props Outdated
Comment thread src/Build.UnitTests/Evaluation/Expander_Tests.cs Outdated
@sfoslund
Copy link
Copy Markdown
Member Author

@rainersigwald I've pushed my first pass at using reflection. I've tested in VS using scripts\Deploy-MSBuild.ps1 and that's working. It's a little messy so let me know where you want this code to go.

Copy link
Copy Markdown
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

Looking good.

Comment thread src/Build/Evaluation/IntrinsicFunctions.cs Outdated
Comment thread src/Build/Evaluation/IntrinsicFunctions.cs Outdated
Comment thread src/Build/Evaluation/IntrinsicFunctions.cs Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Putting these here exposes them as [MSBuild]:: functions. That's what a lot of our stuff does. Should we consider making it more like [NuGet]::? That's a bigger change for not a ton of benefit. I think I lean toward "nah".

Comment thread eng/TestMSBuild.targets Outdated
Copy link
Copy Markdown
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

Looking good to me. @nkolev92 can you take a look or nominate a NuGet person?

Comment thread src/Build/Resources/Strings.resx Outdated
@nkolev92
Copy link
Copy Markdown
Contributor

I'll take a look.
Tagging some people that might be interested as well.

@zkat @zivkan @rrelyea

@sfoslund sfoslund marked this pull request as ready for review April 30, 2020 17:59
Comment thread eng/Packages.props Outdated
Comment thread src/Build/Evaluation/IntrinsicFunctions.cs Outdated
Comment thread src/Build/Utilities/NuGetFrameworkWrapper.cs Outdated
Comment thread src/Build/Evaluation/IntrinsicFunctions.cs Outdated
Comment thread src/Build/Utilities/NuGetFrameworkWrapper.cs Outdated
Comment thread src/Build/Utilities/NuGetFrameworkWrapper.cs Outdated
@dsplaisted
Copy link
Copy Markdown
Member

@sfoslund @rainersigwald Should this be retargeted to the 16.7 branch?

@Forgind
Copy link
Copy Markdown
Contributor

Forgind commented May 8, 2020

@sfoslund @rainersigwald Should this be retargeted to the 16.7 branch?

master currently goes to VS 16.7.

@sfoslund
Copy link
Copy Markdown
Member Author

@rainersigwald I think I'm caught up on feedback here, unless we want to switch to [NuGet]:: instead of [MSBuild]::. Do you have anything else?

Copy link
Copy Markdown
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

Can you separate out the test refactoring (adding expander and expectedMessage) from the new feature? I think this is good to go with those in individual commits.

Comment thread src/Build/Evaluation/IntrinsicFunctions.cs Outdated
Comment thread src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj Outdated
@sfoslund
Copy link
Copy Markdown
Member Author

@rainersigwald sounds good, just pushed those updates. 😄

Comment thread src/Build/Evaluation/IntrinsicFunctions.cs Outdated
Copy link
Copy Markdown
Contributor

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

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

LGTM :)
I only reviewed the NuGet API usage.

return SimpleVersion.Parse(a) <= SimpleVersion.Parse(b);
}

internal static string GetTargetFrameworkIdentifier(string tfm)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should have a follow up issue for getting the platform (.NET 5 era intrinsics)

@rainersigwald rainersigwald added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Jun 5, 2020
@rainersigwald rainersigwald merged commit 51e8dd2 into dotnet:master Jun 10, 2020
@ghost ghost added this to the current-release milestone Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants