Skip to content

#382 tweak dependencies based on new tfm #383

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

Merged
merged 8 commits into from
May 29, 2025

Conversation

thompson-tomo
Copy link
Contributor

Closes #382

@CLAassistant
Copy link

CLAassistant commented May 17, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@thompson-tomo thompson-tomo changed the title #382 tweak dependencies based on tfm #382 tweak dependencies based on new tfm May 17, 2025
Copy link
Contributor

@ejsmith ejsmith left a comment

Choose a reason for hiding this comment

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

dotnet/runtime#115124 (comment)

This seems to say that we should just add the additional target frameworks and leave the packagereferences alone.

@thompson-tomo thompson-tomo requested a review from ejsmith May 19, 2025 05:32
@thompson-tomo
Copy link
Contributor Author

So my reading of that issue is that recommendation only applies to bcl libraries & when the classes are exposed in public apis.

@ejsmith
Copy link
Contributor

ejsmith commented May 19, 2025

My understanding is that if we just add the other targets that the dependencies will just automatically go away on platforms where those dependencies are already included.

@thompson-tomo
Copy link
Contributor Author

thompson-tomo commented May 19, 2025

Not the case as they clearly mention the polyfil in particular the redirect which only happens due to library rename. Just look at what the Azure team has done with their libraries where they kept the bcl but not STJ. See their summary in Azure/azure-sdk-for-net#48977 (comment)

@ejsmith
Copy link
Contributor

ejsmith commented May 19, 2025

Hmm. I think we are going to need to run the tests on each platform to make sure we didn't break anything.

@niemyjski
Copy link
Member

Hmm. I think we are going to need to run the tests on each platform to make sure we didn't break anything.

Are we expecting to update all projects to target both of these? I'm guessing so or should we just run on lowest (netstandard)? Ideally someday I'd like to bump the netstandard for NRT.

@thompson-tomo thompson-tomo requested a review from niemyjski May 27, 2025 12:20
@thompson-tomo
Copy link
Contributor Author

Yes expectation is that most if not all projects are bumped so that they follow the same TFM.

@niemyjski niemyjski requested a review from Copilot May 29, 2025 21:31
@niemyjski niemyjski self-assigned this May 29, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates package dependencies to account for a new net8.0 target framework and adjusts references conditionally based on TFM compatibility.

  • Extracts certain PackageReference entries into conditional <ItemGroup> blocks for non-net6.0 targets.
  • Moves System.Collections.Immutable in the Xunit project under a compatibility check.
  • Adds net8.0 alongside netstandard2.0 in the shared TargetFrameworks list.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Foundatio/Foundatio.csproj Split core dependencies into TFM-specific <ItemGroup> blocks with comments
src/Foundatio.Xunit/Foundatio.Xunit.csproj Wrapped System.Collections.Immutable in a TFM compatibility condition
build/common.props Appended net8.0 to <TargetFrameworks>

@niemyjski niemyjski merged commit 808e517 into FoundatioFx:main May 29, 2025
2 checks passed
@niemyjski
Copy link
Member

Thanks for the PR. I'm going to fix up some of the new warnings and build pipeline so all TFMs run for tests

@thompson-tomo thompson-tomo deleted the task/#382_TweakDependencies branch May 30, 2025 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add additional TFM to eliminate explicit dependencies
4 participants