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

Only reference FreeBSD RIDs when targetting FreeBSD #98948

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

akoeplinger
Copy link
Member

Since they're not built as part of the official build and aren't on the nuget feeds we won't find the runtime and apphost packs so only include them when targetting FreeBSD.

Fixes dotnet/installer#18768

Since they're not built as part of the official build and aren't on the nuget feeds we won't find the runtime and apphost packs so only include them when targetting FreeBSD.

Fixes dotnet/installer#18768
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64</RuntimeIdentifiers>
<!-- FreeBSD runtime/apphost packs aren't built in the official build so only reference the RIDs when targetting FreeBSD -->
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(TargetOS)' == 'freebsd'">$(RuntimeIdentifiers);freebsd-x64;freebsd-arm64</RuntimeIdentifiers>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(TargetOS)' == 'freebsd'">$(RuntimeIdentifiers);freebsd-x64;freebsd-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true' or '$(TargetOS)' == 'freebsd'">$(RuntimeIdentifiers);freebsd-x64;freebsd-arm64</RuntimeIdentifiers>

Is and going to break source build for FreeBSD?

Copy link
Member

Choose a reason for hiding this comment

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

or wouldn't fix the build as this affects non-source build. This should probably just be

Suggested change
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(TargetOS)' == 'freebsd'">$(RuntimeIdentifiers);freebsd-x64;freebsd-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetOS)' == 'freebsd'">$(RuntimeIdentifiers);freebsd-x64;freebsd-arm64</RuntimeIdentifiers>

Copy link
Member Author

Choose a reason for hiding this comment

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

no this should be fine:

  1. source-build case: DotNetBuildSourceOnly == true so this condition doesn't apply now and didn't before
  2. non-source-build case: DotNetBuildSourceOnly == false and now we only add the freebsd RIDs when we're targetting freebsd

<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64</RuntimeIdentifiers>
<!-- FreeBSD runtime/apphost packs aren't built in the official build so only reference the RIDs when targetting FreeBSD -->
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(TargetOS)' == 'freebsd'">$(RuntimeIdentifiers);freebsd-x64;freebsd-arm64</RuntimeIdentifiers>
Copy link
Member

@jkotas jkotas Feb 26, 2024

Choose a reason for hiding this comment

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

Do we need the RuntimeIdentifiers property at all? What happens if this line is deleted?

These lists of OS/architectures combos are pain to maintain. It would be best to get rid of them where possible.

Copy link
Member

Choose a reason for hiding this comment

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

I think this line defines which crossgen2 packs are getting generated. cc @jkoritzinsky

Copy link
Member

Choose a reason for hiding this comment

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

I'll need to check, but I'm pretty sure we can remove this (as we produce shared framework package per rid-specific build anyway).

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, I'll merge this to fix codeflow but I'll open a follow-up PR to try removing the line.

Copy link
Member Author

Choose a reason for hiding this comment

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

@akoeplinger akoeplinger merged commit c7664ff into dotnet:main Feb 26, 2024
144 of 147 checks passed
@akoeplinger akoeplinger deleted the fix-freebsd branch February 26, 2024 22:14
akoeplinger added a commit to akoeplinger/runtime that referenced this pull request Feb 26, 2024
akoeplinger added a commit to akoeplinger/runtime that referenced this pull request Mar 1, 2024
akoeplinger added a commit to akoeplinger/runtime that referenced this pull request Mar 4, 2024
akoeplinger added a commit that referenced this pull request Mar 4, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inclusion of freebsd RIDs causes restore error on vertical builds
5 participants