-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add net6.0 Target #145
Add net6.0 Target #145
Conversation
while i dont object to this PR. i am curious as to why it is required. targeting net5 should be enough to support net6 and net7 |
See also: serilog/serilog-sinks-file#295 I think this in some ways comes down to a support issue; we do hit reports pretty much every week about this or similar concerns. Serilog 3 is now targeting: <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net462;net471</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);netstandard2.1;netstandard2.0;net5.0;net6.0;net7.0</TargetFrameworks> It might make the most sense to a) target these TFMs here (and in the other linked PR), b) bump the major package version to communicate the breaking change (dropping the oldest .NET Standard versions), and c) move to enshrine these in a standard (Edit: I should say - except for the Extensions ones, which target .NET versions 1:1 for other reasons.) What do you think @SimonCropp @bartelink ? |
I don't see how this ever becomes manageable unless we figure out a unified policy and have a statement to refer people to. I'd say the basics are:
In summary, my proposed policy for impls is:
Then we need specific rules about versioning:
Perhaps Nick could add a So, specific things now:
addendum: see also this comment for more reasons to have a VERSIONING.md #145 (comment) |
@@ -4,7 +4,7 @@ | |||
<Description>A Serilog sink that writes log events to the console/terminal.</Description> | |||
<VersionPrefix>4.2.0</VersionPrefix> | |||
<Authors>Serilog Contributors</Authors> | |||
<TargetFrameworks>net45;netstandard1.3;netstandard2.0;net5.0</TargetFrameworks> | |||
<TargetFrameworks>net45;netstandard1.3;netstandard2.0;net5.0;net6.0;net7.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per the skeleton policy in the comment, I would not add net7.0 (and would also not add net8.0
in a few months either)
<TargetFrameworks>net45;netstandard1.3;netstandard2.0;net5.0;net6.0;net7.0</TargetFrameworks> | |
<TargetFrameworks>net45;netstandard1.3;netstandard2.0;net5.0;net6.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I think signaling support of .Net8.0 now does make sense. I just submitted a PR yesterday for another project that makes Grpc work with named pipes, that already had .Net8.0. Seems to be in the mix. Just be aware that some folks may not have the SDK on their box for whatever reason and some may not be able to add it yet for IT policy reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have a VERSIONING.md, we can point people to that.
It will mention that the default assumption is that the world uses Serilog and if it is not happy on the latest FW release or preview, that's a bug that needs fixing immediately, with a link to the download counts so people can stop relying on inferring support based on the presence of a variant that requires a TFM
It will also mention that just because there is only a net6.0 target in the package does not mean that it can't be used with 8/9/10/11/12 etc
For me the important part of supporting net8.0 is to have the test suite use it
This means two things
- people forking the repo need it on their box
- the CI needs to support it (if its -latest images, that's covered)
For gRPC stuff, it would not surprise me if they have a dependency on new stuff in 7.0 or 8.0
In that case, they will likely no longer support 6.0, which is a breaking change which we would signal with a major version bump
If Serilog added a net8.0 target for a reason (some newer API means we can implement a feature or do something quicker or with less memory), then the CI would need a new SDK, and the package would get a new TFM - but there is zero impact on devs using the package - they can upgrade and a net6 SDK will safely ignore the new package (and use the most relevant impl that's already in the package)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, realised the actual point you were making about 'IT policy reasons'; IMO:
main
should never use non-RTM TFMs (i.e. baseline stance is no point releasing a final version that relies on a thing in preview)dev
and PRs can use previews if developing a new feature or tuning that requires preview - the critical bit is the CI env having them; we would not merge without that anyway- because CI will cover the preview SDK requirement, people contributing PRs can do a local edit to temporarily e.g. skip testing net8.0
Bottom line is that this situation will be very rare, as we're not talking about constantly being on tenterhooks to get some new null release out adding a new Target to the package whenever MS are about to drop a release of anything
@@ -1,7 +1,7 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
|
|||
<PropertyGroup> | |||
<TargetFrameworks>netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net452;net462;net472;net48;net5.0</TargetFrameworks> | |||
<TargetFrameworks>netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net452;net462;net472;net48;net5.0;net6.0;net7.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per my skeleton policy, I'd remove the long dead core versions from the test matrix
Not sure if net452, 62, 72 have value, but net45;netstandard1.3
need coverage (I'm assuming net48
covers netstandard2.0
)
<TargetFrameworks>netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net452;net462;net472;net48;net5.0;net6.0;net7.0</TargetFrameworks> | |
<TargetFrameworks>net452;net462;net472;net48;net6.0;net7.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nblumhardt thoughts? Leaner makes sense to me, and this is a test project after all, so targeting standards is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
net7 was added here but not in File; we should be consistent one way or the other (I'm fine with adding it in both or neither). Though it seems the most reasonable thing is to add it into .File
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing the work - in general it all makes sense
I added comments re minor things that don't fit my policy proposal.
Others will review in due course (and/or I'll adjust this review in line with agreed changes to the policy)
Co-authored-by: Ruben Bartelink <ruben@bartelink.com>
@@ -2,7 +2,7 @@ | |||
|
|||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFrameworks>netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net452;net462;net472;net48;net5.0</TargetFrameworks> | |||
<TargetFrameworks>netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net452;net462;net472;net48;net5.0;net6.0;net7.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aligning with policy/coverage in serilog/serilog:
<TargetFrameworks>netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net452;net462;net472;net48;net5.0;net6.0;net7.0</TargetFrameworks> | |
<TargetFrameworks>net472;net48;net5.0;net6.0;net7.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; would like to see us either have net7.0 included in File test suite or removed from this one for consistency though
(and in both places, if the CI can support it, no harm to validate test suite with net8.0
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zachrybaker Needs rebasing now. As I see it:
- Medium term strategy for Target Framework Monikers serilog#1970 documents the policy
dev
has 6.0 in all places, tests are at 7.0 (i.e. your PR has effectively been cherry-picked)- the impl package right now targets
net462;net471;netstandard2.1;netstandard2.0;net5.0;net6.0;net7.0
- there has not been a final 5.0.0 release yet
I believe the correct thing to do now is to follow the policy, and trim the targeted TFMs for the implementation package in Serilog.Sinks.Console.csproj
to net462;net471
+ netstandard2.0;net6.0
Once that's merged and the dev build has been validated, we'd be clear for a 5.0.0 final release
@nblumhardt I guess it's too late now, but maybe a 5.0.1 that trims the netstandard2.1, net5.0 and net7.0 targets might still make sense? |
@bartelink thanks for the ping 👍 I think the packages that just went out all align with the same TFMs as Serilog 3.1, definitely room for an update but not sure yet whether we should call that "3.2" or "4.0" ----- brewing some ideas :-) |
True; I guess it's not a massive deal For avoidance of doubt, |
Sounds good 👍 |
Was this superceeded by #157 ? |
Thanks @zachrybaker and reviewers; everything should now be aligned with Serilog 4's TFMs, we got there in the end! :-) |
Huzzah!
…On Fri, Jun 21, 2024 at 4:05 AM Nicholas Blumhardt ***@***.***> wrote:
Thanks @zachrybaker <https://github.com/zachrybaker> and reviewers;
everything should now be aligned with Serilog 4's TFMs, we got there in the
end! :-)
—
Reply to this email directly, view it on GitHub
<#145 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACDSMSFLLEIDTQPKW5IEVTZIPUFBAVCNFSM6AAAAABJUV5V7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGMZTKNJWGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
What issue does this PR address?
Please add net6.0, net7.0 targets
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Other information:
Please list any other relevant information here