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

#380 Add net60 as additional target framework #381

Merged
merged 5 commits into from May 12, 2024

Conversation

thompson-tomo
Copy link
Contributor

Makes eliminated packages where they can be provided by the framework by using conditions and added net 6 to STJ so that it can also become optional.

Closes #380

@axunonb
Copy link
Member

axunonb commented Apr 17, 2024

@thompson-tomo Thanks! Please have a look at the failing build on appveyor for this PR.

@thompson-tomo
Copy link
Contributor Author

@axunonb have gone and added an additional dependency to ZString to resolve the build issue.

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96%. Comparing base (b438ccd) to head (2b45a8a).

Additional details and impacted files
@@             Coverage Diff              @@
##           version/3.5.0   #381   +/-   ##
============================================
  Coverage             96%    96%           
============================================
  Files                 92     92           
  Lines               3233   3233           
============================================
  Hits                3117   3117           
  Misses               116    116           

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

@axunonb
Copy link
Member

axunonb commented Apr 19, 2024

Thanks for the fix. If we added net60, shouldn't this cover the main and all extension projects?
We'll have a closer look during next days.

@thompson-tomo
Copy link
Contributor Author

Hmm, there is 2 trains of thought:

  • Keep framework's consistent across libraries
  • only target needed frameworks ie based on needs (dependency reduction, AOT, trimming etc)

I don't have a strong opinion either way but do tend for send one due to package size reduction.

@axunonb axunonb changed the title #380 Add net 6 to STJ project and make other dependencies conditional #380 Add net 6 to System.Text.Json extension conditional dependencies Apr 28, 2024
@axunonb
Copy link
Member

axunonb commented Apr 28, 2024

Adding NET60 as a target framework to only 1-2 projects is not enough. We're ready to go this step, but for all SmartFormat projects. Cysharp/ZString released v2.6.0 lately, which also targets NET60 and NET70. All this requires a deeper look into all consequences and possible issues. Maybe we can finally reference Cysharp/ZString as a package directly.
So a first step to go might be to migrate Cysharp/ZString to v2.6.0, and afterwards add NET60 to all projects - including the conditional dependencies you're suggesting.

@axunonb axunonb changed the title #380 Add net 6 to System.Text.Json extension conditional dependencies #380 Add net 6 to System.Text.Json extension with conditional dependencies Apr 28, 2024
@thompson-tomo
Copy link
Contributor Author

Have gone and cleaned up properties which has allowed me to bump all packages in 1 hit. I have overridden the TFM for the base package due to nullability issues which someone should look at.

@axunonb
Copy link
Member

axunonb commented May 10, 2024

We've created a new branch v3.5.0.
It already includes necessary changes to reference the Cysharp ZString Nuget package.
To continue with this PR please rebase to this new branch. It would be great to cover all (extension) projects the way you propose for System.Text.Json.
After merging the PR, a final step is to update conditional compilation in the current code base, and to update package references to the latest versions. We'll start with this workload now.

@thompson-tomo thompson-tomo changed the base branch from main to version/3.5.0 May 12, 2024 00:20
@thompson-tomo
Copy link
Contributor Author

@axunonb requested changes have been made and all builds now.

@axunonb axunonb self-requested a review May 12, 2024 09:21
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>SmartFormat.Demo.ico</ApplicationIcon>
<LangVersion>8.0</LangVersion>
<Nullable>disable</Nullable>
<NoWarn>1591,1573</NoWarn>
Copy link
Member

Choose a reason for hiding this comment

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

Override Directory.Build.props

@@ -9,6 +9,8 @@
<SignAssembly>true</SignAssembly>
<AssemblyName>Performance_v27</AssemblyName>
<RootNamespace>Performance</RootNamespace>
<Nullable>disable</Nullable>
<NoWarn>1591,1573</NoWarn>
Copy link
Member

Choose a reason for hiding this comment

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

Override Directory.Build.props

<LangVersion>9.0</LangVersion>
<AssemblyOriginatorKeyFile>../SmartFormat/SmartFormat.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<Nullable>disable</Nullable>
<NoWarn>1591,1573</NoWarn>
Copy link
Member

Choose a reason for hiding this comment

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

Override Directory.Build.props

@axunonb axunonb changed the title #380 Add net 6 to System.Text.Json extension with conditional dependencies #380 Add net60 as additional target framework May 12, 2024
@axunonb
Copy link
Member

axunonb commented May 12, 2024

LGTM, thanks for the PR and your initiative.

@axunonb axunonb merged commit 6c03255 into axuno:version/3.5.0 May 12, 2024
4 checks passed
@thompson-tomo thompson-tomo deleted the chore/#380_AddNet6 branch May 12, 2024 11:42
axunonb added a commit that referenced this pull request May 15, 2024
* Reference to Cysharp ZString v2.6.0 package (#382)
* Reference Cysharp `ZString` v2.6.0 in `SmartFormat` project (net461 target use the netstandard2.0 assemblies)
* Remove project `SmartFormat.Zstring`
* Move internal static class ZStringBuilderExtensions to namespace SmartFormat.ZString
* Rename ZStringBuilderExtensions to ZStringBuilderUtilities
* Exclude ZString wrappers from code coverage (#384)
* Flag `ZStringBuilder` and `ZStringWriter`with `[ExcludeFromCodeCoverage]`
* Add AltCoverAttributeFilter="ExcludeFromCodeCoverage" in CI tests
* #380 Add net60 as additional target framework (#381)
* #380 Add net 6 to STJ project and make other dependencies conditional
* Optimize package properties.
* Fix nullability and warning issues for Demo and Performance projects
* chore: net60/ZString related housekeeping (#385)
* Directory.Build.props: Remove duplicate entries from Demo and Performance projects
* Enable NRT for Demo and Performance projects
* Remove folder SmartFormat.ZString from former projects SmartFormat.ZString
* Remove obsolete entries from SmartFormat.sln
* Remove reference to former SmartFormat.ZString.dll from SmartFormat.csproj
* Enable net60 for project SmartFormat (#387)
* feat: Add net8.0 as a target framework (#388)
* Mark CTOR overload (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) as obsolete (like it is in net8.0).
* Update proprocessor directives and nuget packages
* Change appveyor_build_worker_image to Ubuntu2204
* Add net8.0 as target framework
* Update target framework net461 to net462
* Bump version to v3.4.0

---------

Co-authored-by: James Thompson <thompson.tomo@outlook.com>
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.

Add additional TFM to eliminate explicit dependency
2 participants