Skip to content

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Use ArtifactsPath #2676

wants to merge 3 commits into from

Conversation

timcassell
Copy link
Collaborator

@timcassell timcassell commented Dec 14, 2024

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 pass PublishDir also to work for both old and new sdks.

@timcassell
Copy link
Collaborator Author

@adamsitnik Based on your comment #2693 (comment), should we just always use ArtifactsPath and not worry about older sdks here?

@filzrev
Copy link
Contributor

filzrev commented May 1, 2025

I want to use this PR feature for benchmarks that use multi NuGet versions.

Is it possible to raise priority for review/merge?
And available as nightly build package?

Copy link
Member

@AndreyAkinshin AndreyAkinshin left a 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.

@timcassell timcassell force-pushed the fix-intermediateoutputpath branch from fb9c47a to 9fc29a0 Compare May 2, 2025 01:34
@timcassell
Copy link
Collaborator Author

timcassell commented May 2, 2025

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).

@timcassell timcassell requested a review from AndreyAkinshin May 2, 2025 01:37
@timcassell timcassell force-pushed the fix-intermediateoutputpath branch from 9fc29a0 to 5edbfa8 Compare May 2, 2025 01:39
@timcassell timcassell force-pushed the fix-intermediateoutputpath branch from 5edbfa8 to 5a1fad3 Compare May 2, 2025 01:43
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)
Copy link
Collaborator Author

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?

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