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

System.Formats.Cbor.Tests.DataModel: don't sign when DotNetBuildSourceOnly. #111123

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

tmds
Copy link
Member

@tmds tmds commented Jan 6, 2025

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 6, 2025
@tmds
Copy link
Member Author

tmds commented Jan 6, 2025

I validated this fixes the issue we see in our internal CI.

@@ -4,6 +4,8 @@
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- NuGet restore issue with TargetFrameworks in f# projects: https://github.com/NuGet/Home/issues/10005 -->
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- Public signing (performed under DotNetBuildSourceOnly) is broken for f#: https://github.com/dotnet/fsharp/issues/17451 -->
<SignAssembly Condition="'$(DotNetBuildSourceOnly)' == 'true'">false</SignAssembly>
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it make more sense to apply this to all fsproj files from a shared rule, and then remove it from the shared rule when the signing bug is fixed?

e.g. a rule that looks at the project file extension in a dirs.props or dirs.targets?

Copy link
Member Author

Choose a reason for hiding this comment

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

If we want to apply this more general, we should probably do it in arcade ProjectDefaults.props.

This is a workaround for just this project (which seems to be the only affected).

@ViktorHofer @mmitche what is your preference?

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. Please make the change in Arcade, probably under Workaround.targets.

@tmds
Copy link
Member Author

tmds commented Jan 7, 2025

Closing in favor of dotnet/arcade#15380.

@tmds
Copy link
Member Author

tmds commented Jan 16, 2025

I'm re-opening this because the attempt to generally tackle this in arcade failed, see dotnet/arcade#15420.

I would prefer to make this change rather than try to add more complex logic to arcade.

@ViktorHofer
Copy link
Member

There's already a tracking issue for the failing test: #111460. Not sure why BuildAnalysis doesn't see it.

/ba-g ignore

@ViktorHofer ViktorHofer merged commit 9599b26 into dotnet:main Jan 16, 2025
79 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.Formats.Cbor.Tests.DataModel.fsproj gets compiled with --publicsign+ when DotNetBuildSourceOnly=true
3 participants