Skip to content

Conversation

josesimoes
Copy link
Contributor

- 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)
Copy link
Owner

@angularsen angularsen left a 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();
Copy link
Owner

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.

Copy link
Contributor Author

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, 😄

@angularsen
Copy link
Owner

angularsen commented Aug 12, 2021 via email

@josesimoes
Copy link
Contributor Author

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.

@angularsen angularsen merged commit 02a7d7d into angularsen:master Aug 12, 2021
@angularsen
Copy link
Owner

Great! 😆

@josesimoes josesimoes deleted the fix-stable-package-ref branch August 13, 2021 07:34
@josesimoes josesimoes restored the fix-stable-package-ref branch August 13, 2021 07:35
@josesimoes josesimoes deleted the fix-stable-package-ref branch August 13, 2021 07:35
@josesimoes
Copy link
Contributor Author

@angularsen when you have the opportunity, please fire a build for the nano packages so they can pickup the stable version.

@angularsen
Copy link
Owner

On the way. I added a script upgrade-nanoframework.sh in 71d59aa, so next time you can simply run ./upgrade-nanoframework.sh and issue a pull request to update the nanoFramework versions.

Release UnitsNet/4.101.0 · angularsen/UnitsNet

@josesimoes
Copy link
Contributor Author

@angularsen perfect! Thanks for taking care of this. 👌🏻

@angularsen
Copy link
Owner

@josesimoes The build is failing for some reason after nanoframework upgrade, could you investigate please?

C:\projects\unitsnet\UnitsNet.NanoFramework\GeneratedCode\Quantities\LinearDensity.g.cs(167,23): error CS0518: Predefined type 'System.Object' is not defined or imported

https://ci.appveyor.com/project/angularsen/unitsnet/builds/40367434

@josesimoes
Copy link
Contributor Author

On it! Raised #962 to track it.

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.

Reference to the CoreLibrary in UnitsNet.nanoFramework.Pressure library not in sync with nanoFramework.Iot.Device.Bmxx80
2 participants