-
Notifications
You must be signed in to change notification settings - Fork 209
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
Update to lts 31 #165
Update to lts 31 #165
Conversation
I did not checked if some of the
but i can take a look If you'd like to avoid manual check for the future, there's a very easy way using nuget to acheive "Get latest stable version", that could be used only for serilog dependencies here :
|
Build.ps1
Outdated
Remove-Item .\artifacts -Force -Recurse | ||
} | ||
|
||
& dotnet restore --no-cache | ||
|
||
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL]; | ||
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; | ||
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$null -ne $env:APPVEYOR_REPO_BRANCH]; |
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.
What is the reason for changing the order of the arguments?
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.
it's a warning from the linter too, shipped within the Powershell
extensions (msft powershell team)
i don't have the underlying reason for this one.
my personal guess would be that it applies the same principle as some unit test lib : expected/constants on the left operand.
but it's just a guess
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.
This reminds me https://en.wikipedia.org/wiki/Yoda_conditions
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.
i can totally revert it ;)
less warning, less "eye catchy squiggle" ^^
like "always try to enable WarnAsError"
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.
It doesn’t matter to me.
FYI : currently updating the 2 other serilog repository that leak transitive from 2.x and i will really need a decision from |
I previously suggested multi-targeting to 3.x with @nblumhardt in serilog/serilog-extensions-logging#155 but we concluded there's actually no reason to do so, and it makes tooling etc more complicated. I discussed the issues recently in a blog post: https://andrewlock.net/converting-a-netstandard-2-library-to-netcore-3/#libraries-that-depend-on-microsoft-extensions-nuget-packages The conclusion was that there's no need to upgrade this library, serilog-extensions-hosting, or serilog-extensions-logging! The other commits that remove deprecated properties etc would definitely be handy though 🙂 |
EDIT : previous answers was weird ;) As you said, This repo consumes a package the was previously shipped as a Nuget, and now shipped from the I made 2 other PR to 2 others repo that only consumed Few minutes before your answer here, i rolled that back to This is done already in Serilog.Settings.Configuration, for example : |
Hi @tebeco - I think we should go ahead with this change; thanks for sending the PR, and sorry about the slow turnaround at this end. Would it be possible to remove the other build script and CSPROJ changes (latest version references etc.) from the PR, and just commit the Thanks! |
So this means that when the nuget is released, serilog transitive will potentially points to deprecated version ? |
As you said, you standardize few things, like the icon URL. As nuget team is actively depracting it, that's why i changed it here as it's probably going to be needed. No idea why the change, but i guess that relying on an external URL for an icon can lead to issues like DNS issues / timeout / unpaid domain / overflow / crafted response / ... |
@nblumhardt |
Thanks for the follow-up @tebeco 👍 We should make the It looks like you may not have pushed your updated changes to your branch? Everything still looks the same. Cheers! |
@nblumhardt |
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! This looks great; just one minor thing regarding referenced package versions, otherwise I think we're set! 😎
@nblumhardt |
regarding all the so everytime you update the build process,
that way you could may a bot attempts to automatically creates PR + run the script of all organization repositories here => One fix to fix them all |
…uget being used at build time
(rebased / force-with-lease on |
👍 thanks! I'll bump the package version to 3.3.0 because of the dependency version updates. We'd normally consider these a breaking change, but since the package will still run on the earlier versions of those dependencies, I think we can squeeze this into a minor version bump. |
Thx a lot for your time ;) Do you think the others repo that were not bump could cross target So far nuget resolves the oldest possible match => it does not respect anymore That would be a way to helps nuget resolves proper dependencies based on the TFM wihtout breaking backward compat. |
Should the SDK in global.json also be updated to latest 3.1? Stock VS2019 install will not open this solution. It is also not the latest 3.0 version. |
@CleverNeologism @tebeco Hi, can you tell me what is the point in the global.json file? When I do not have the exact sdk mentioned in global.json, then solution does not open. It’s easier for me just to delete this file so that everything works. |
https://docs.microsoft.com/en-us/dotnet/core/tools/global-json?tabs=netcore3x that's probably faster to link than attempting a long explanation that could potentially be wrong |
This PR intention is to update it to
netcoreapp3.1
as it is LTS.As of today, when
serilog-aspnetcore
is used in project targetingnetcoreapp3.1
, it "leaks" few transitive dependenciesMicrosoft.AspNetCore.xxx
andMicrosoft.Extensions.xxx
version2.x.y
.2.0.x
to2.1.*
(Wildcard to get the latest patch available at build time)AspNetCore 3.1
is NOTnetstandard2.0/2.1
but onlynetcoreapp3.1
, i cross targetted to bothnetcoreapp3.1
forAspNetCore3.1
(LTS)netstandard2.0
forAspNetCore2.1
(Also LTS)AspNetCore 3.1
is LTS, i changed the SampleTargetFramework
fromnetcoreapp3.0
tonetcoreapp3.1
MsBuild
Condition on theTargetFramework
becauseAspNetCore2.x
is build with direct dependencies onMsft.Extensions 2.x
AspNetCore2.x
is build with direct dependencies onMsft.Extensions 3.x
This means the dependencies version need to follow this
AppVeyor
image toVs 2019
(because netcoreapp is supposed to requires vs2019 but not sure it's needed here are runningdotnet-install.ps1 -Channel 3.1
would just install the latest3.1 SDK
powershell
warning from the linter (general idea is to never use alias, as it could leads to missunderstand or error, eg :rm -rf
the-f
is for-Filter
and not--force
)serilog-extension-nuget.png
to the repo andPackageIcon
as the currentPackageIconUrl
is is deprecated for recent SDK (see https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#packageiconurl)