-
-
Notifications
You must be signed in to change notification settings - Fork 990
Use ArtifactsPath #2676
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
base: master
Are you sure you want to change the base?
Use ArtifactsPath #2676
Conversation
e20dd82
to
6c5a4e5
Compare
6c5a4e5
to
fb9c47a
Compare
@adamsitnik Based on your comment #2693 (comment), should we just always use ArtifactsPath and not worry about older sdks here? |
I want to use this PR feature for benchmarks that use multi NuGet versions. Is it possible to raise priority for review/merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The end of support for .NET SDK 7.0 is May 14, 2024, which is about a year away. I suggest dropping support for .NET SDK 7 and requiring .NET SDK 8 or higher. This change would allow us to use ArtifactsPath everywhere by default, eliminating the need to pass useArtifactsPath
repeatedly. Additionally, we should implement a warning for users attempting to run BenchmarkDotNet with older versions of the SDK.
Pass PublishDir property to dotnet.
fb9c47a
to
9fc29a0
Compare
Updated to your feedback. If we merge #2725, we can update the warning message to tell the user to disable parallel builds (or we could do it automatically). |
9fc29a0
to
5edbfa8
Compare
Updated DotNetSdkValidator.
5edbfa8
to
5a1fad3
Compare
if (installedVersionString == null || Version.TryParse(installedVersionString, out var installedVersion) && installedVersion < requiredSdkVersion) | ||
{ | ||
yield return new ValidationError(true, $"The required .NET Framework SDK version {requiredSdkVersion} or higher is not installed.", benchmark); | ||
} | ||
else if (requiredSdkVersion.Major < 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon review, I think this check will always fail. I'm not sure how to determine whether the dotnet core sdk will successfully use ArtifactsPath when building older tfms. @rainersigwald Does sdk 8+ always use ArtifactsPath, or does it delegate the build to the older sdks?
Fixes #2425
Fixes #2664
We set
ArtifactsPath
if the dotnet sdk used supports it (v8.0 or higher). Older sdks still use the same build logic as previous, and as far as I could find out, it's the best we can do for those older sdks.Passing
ArtifactsPath
also makes MSBuild output publish directory differently by default, so we passPublishDir
also to work for both old and new sdks.