-
Notifications
You must be signed in to change notification settings - Fork 400
Fix referencing stable/preview NuGets for .NET nanoFramework #958
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
Fix referencing stable/preview NuGets for .NET nanoFramework #958
Conversation
- Implement code to figure out if the the latest mscorlib version is preview or stable and use the appropriate version. (previously it was referencing only preview versions)
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.
One question below
//var mscorlibPackage = packageVersions.OrderByDescending(v => v).First(); | ||
// get NuGet package Version for mscorlib | ||
var latestStableVersion = packageVersions.OrderByDescending(v => v).First(); | ||
var latestPreviewVersion = packageVersions.Where(v => v.IsPrerelease).OrderByDescending(v => v).First(); |
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.
Can't this be simplified to simply grab the highest version, regardless of it being preview or stable? latestStableVersion
seems to do that already, if I am reading it right.
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 can, of course.
The thing is that I thought to have processing both preview and stable in case we need to specifically target one or the other.
Of course that would require an extra parameter to pass that and adapt all call upwards.
If you don't like it, I can simplify and just grab the latest, regardless of the preview/stable state.
Let me know how you prefer, 😄
I'm just thinking that the typical scenario for later is that we want to
restrict to using only stable packages. That would basically be to add a
`!IsPrerelease` condition in there.
I don't see it likely to only want prerelease nugets, even if there are
newer stable ones?
It really is nitpicking here, but it just seemed redundant to me. You
decide 👍
|
So let's end the "nitpicking contest" 😉 and go for the simplest approach: just grab the latest version there. Doesn't matter if it's preview or stable. |
Great! 😆 |
@angularsen when you have the opportunity, please fire a build for the nano packages so they can pickup the stable version. |
On the way. I added a script |
@angularsen perfect! Thanks for taking care of this. 👌🏻 |
@josesimoes The build is failing for some reason after nanoframework upgrade, could you investigate please?
https://ci.appveyor.com/project/angularsen/unitsnet/builds/40367434 |
On it! Raised #962 to track it. |
(previously it was referencing only preview versions)