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

#3792 Leverage framework for dependencies #3800

Merged

Conversation

thompson-tomo
Copy link
Contributor

What kind of change does this PR introduce?
update

What is the current behavior?
Packages are the same for all TFM's

What is the new behavior?
Less dependencies are included for net 6+ due to them being available as part of the framework

What might this PR break?
n/a

Other information:
closes #3792

@thompson-tomo thompson-tomo force-pushed the chore/#3792_DependencyAdjustement branch from 835e9b5 to bfdc2b8 Compare May 14, 2024 12:56
Copy link
Member

@ChrisPulman ChrisPulman left a comment

Choose a reason for hiding this comment

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

As you are right about the inclusion in some versions of Net Core I want to give you this PR however the inclusion only happened with Net Core 7+
Please change the ReactiveUI.csproj file to be as per the following, then I will approve it:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>$(BaseTargetFrameworks);$(MobileTargetFrameworks)</TargetFrameworks>
    <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);$(WindowsTargetFrameworks)</TargetFrameworks>
    <AssemblyName>ReactiveUI</AssemblyName>
    <RootNamespace>ReactiveUI</RootNamespace>
    <PackageDescription>A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. This is the base package with the base platform implementations</PackageDescription>
    <PackageId>ReactiveUI</PackageId>
    <!-- Disable "BinaryFormatter is obsolete" warnings for entire project -->
    <NoWarn>$(NoWarn);SYSLIB0011;IDE1006</NoWarn>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
    <TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
  </PropertyGroup>
  <ItemGroup>
    <Compile Remove="Platforms\**\*.cs" />
    <Compile Remove="Resources\**" />
    <None Include="Platforms\**\*.cs" />
    <EmbeddedResource Remove="Resources\**" />
    <None Remove="Resources\**" />
  </ItemGroup>
  <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
    <Compile Include="Platforms\netstandard2.0\**\*.cs" />
    <Compile Include="Platforms\shared\**\*.cs" />
    <PackageReference Include="System.ComponentModel" />
    <PackageReference Include="System.ComponentModel.Annotations" />
    <PackageReference Include="System.Diagnostics.Contracts" />
    <PackageReference Include="System.Dynamic.Runtime" />
    <PackageReference Include="System.Runtime.Serialization.Primitives" />
  </ItemGroup>
  <ItemGroup Condition="$(TargetFramework.EndsWith('-ios')) or $(TargetFramework.EndsWith('-maccatalyst'))">
    <Compile Include="Platforms\apple-common\**\*.cs" />
    <Compile Include="Platforms\ios\**\*.cs" />
    <Compile Include="Platforms\uikit-common\**\*.cs" />
    <Compile Include="Platforms\mobile-common\**\*.cs" />
  </ItemGroup>
  <ItemGroup Condition="$(TargetFramework.EndsWith('-macos'))">
    <Compile Include="Platforms\apple-common\**\*.cs" />
    <Compile Include="Platforms\mac\**\*.cs" />
    <Compile Include="Platforms\mobile-common\**\*.cs" />
  </ItemGroup>
  <ItemGroup Condition="$(TargetFramework.EndsWith('-tvos'))">
    <Compile Include="Platforms\apple-common\**\*.cs" />
    <Compile Include="Platforms\tvos\**\*.cs" />
    <Compile Include="Platforms\uikit-common\**\*.cs" />
    <Compile Include="Platforms\mobile-common\**\*.cs" />
  </ItemGroup>
  <ItemGroup Condition="$(TargetFramework.EndsWith('-android'))">
    <Compile Include="Platforms\android\**\*.cs" />
    <Compile Include="Platforms\mobile-common\**\*.cs" />
  </ItemGroup>
  <ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net8.0' or $(TargetFramework.EndsWith('-windows10.0.17763.0')) or $(TargetFramework.EndsWith('-windows10.0.19041.0')) ">
    <Compile Include="Platforms\net\**\*.cs" />
    <PackageReference Include="System.ComponentModel.Annotations" />
  </ItemGroup>
  <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('net4')) or $(TargetFramework.StartsWith('net6'))">
    <PackageReference Include="System.Text.Json" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Splat" />
    <PackageReference Include="DynamicData" />
  </ItemGroup>
  <ItemGroup>
    <None Update="VariadicTemplates.tt" Generator="TextTemplatingFileGenerator" LastGenOutput="VariadicTemplates.cs" />
    <Compile Update="VariadicTemplates.cs" DesignTime="True" AutoGen="true" DependentUpon="VariadicTemplates.tt" />
  </ItemGroup>
</Project>

@thompson-tomo
Copy link
Contributor Author

@ChrisPulman change is done.

src/ReactiveUI/ReactiveUI.csproj Show resolved Hide resolved
@ChrisPulman
Copy link
Member

Hi James, I had thought I had made this simple by giving you the code to fix the issue, I want to give you credit for this change, but the code must build to accept it, before checking changes in please ensure that the solution builds and all tests pass

@thompson-tomo thompson-tomo force-pushed the chore/#3792_DependencyAdjustement branch from 1cfe30a to 1ab4001 Compare May 18, 2024 00:58
@thompson-tomo thompson-tomo force-pushed the chore/#3792_DependencyAdjustement branch from 1ab4001 to 8e6d852 Compare May 18, 2024 00:59
@thompson-tomo
Copy link
Contributor Author

@dpvreony i am not sure what happened but when i copied the code provided it for some reason didn't like the first line even though nothing was visibly different. As such i have pushed a fresh branch which is compiling on my local machine.

Copy link

codecov bot commented May 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.69%. Comparing base (d75f999) to head (8e6d852).
Report is 60 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3800       +/-   ##
===========================================
+ Coverage   59.03%   69.69%   +10.66%     
===========================================
  Files         160      136       -24     
  Lines        5847     4726     -1121     
  Branches     1031      754      -277     
===========================================
- Hits         3452     3294      -158     
+ Misses       2007     1230      -777     
+ Partials      388      202      -186     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChrisPulman ChrisPulman dismissed dpvreony’s stale review May 18, 2024 08:18

Changes requested have been made

@ChrisPulman ChrisPulman merged commit 97f77fc into reactiveui:main May 18, 2024
3 checks passed
@thompson-tomo thompson-tomo deleted the chore/#3792_DependencyAdjustement branch May 18, 2024 08:48
@database64128
Copy link

This seems to have also fixed dotnet/wpf#8943 for me.

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

Successfully merging this pull request may close these issues.

Leverage dependencies available from framework
4 participants