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

>= 0.0.0-prerelease vs prerelease #1088

Closed
devboy opened this issue Sep 25, 2015 · 14 comments
Closed

>= 0.0.0-prerelease vs prerelease #1088

devboy opened this issue Sep 25, 2015 · 14 comments
Labels

Comments

@devboy
Copy link
Contributor

devboy commented Sep 25, 2015

Let's say I have:

LibraryA 1.0.0
LibraryA 1.1.0-prerelease

Adding the nuget dependency:
nuget LibraryA >= 0.0.0-prerelease will resolve to 1.0.0
nuget LibraryA prerelease will resolve to 1.1.0-prerelease

When using Paket.Pack:
nuget LibraryA >= 0.0.0-prerelease will add a dependency to ">= 0.0.0-prerelease" to the nuspec
nuget LibraryA prerelease will add a dependency to "" to the nuspec

@forki
Copy link
Member

forki commented Sep 25, 2015

Will look into this on Monday when I'm back from sailing
On Sep 25, 2015 4:54 PM, "Dominic Graefen" [email protected] wrote:

Let's say I have:

LibraryA 1.0.0
LibraryA 1.1.0-prerelease

Adding the nuget dependency:
nuget LibraryA >= 0.0.0-prerelease will resolve to 1.0.0
nuget LibraryA prerelease will resolve to 1.1.0-prerelease

When using Paket.Pack:
nuget LibraryA >= 0.0.0-prerelease will add a dependency to ">=
0.0.0-prerelease" to the nuspec
nuget LibraryA prerelease will add a dependency to "" to the nuspec


Reply to this email directly or view it on GitHub
#1088.

@forki
Copy link
Member

forki commented Sep 28, 2015

nuget LibraryA >= 0.0.0-prerelease

this is actually not supported. Why don't you ise

nuget LibraryA >= 0.0.0 prerelease

?

@flowsprenger
Copy link
Contributor

when we use
nuget LibraryA >= 0.0.0-prerelease
and then use Paket.Pack this dependency is added to the nuspec
<dependency id="LibraryA" version="0.0.0-prerelease" />
which creates a transitive dependency on the prerelease.

if we use
nuget LibraryA >= 0.0.0 prerelease
the nuspec has an empty version
<dependency id="LibraryA" version="" />

@forki
Copy link
Member

forki commented Sep 28, 2015

But is that the correct nuspec syntax for prereleases?
On Sep 28, 2015 4:09 PM, "Florian Sprenger" [email protected]
wrote:

when we use
nuget LibraryA >= 0.0.0-prerelease
and then use Paket.Pack this dependency is added to the nuspec

which creates a transitive dependency on the prerelease.

if we use
nuget LibraryA >= 0.0.0 prerelease
the nuspec has an empty version


Reply to this email directly or view it on GitHub
#1088 (comment).

@flowsprenger
Copy link
Contributor

http://docs.nuget.org/create/versioning#Specifying-Version-Ranges-in-.nuspec-Files:
As of NuGet 1.6, NuGet supports the creation of prerelease packages by specifying a prerelease string in the version number according to the Semantic Versioning (SemVer) specification.

also paket update will resolve <dependency id="LibraryA" version="0.0.0-prerelease" /> to the latest prerelease already

@forki
Copy link
Member

forki commented Sep 28, 2015

Ok so the bug is actually in the code that creates the new nuspec during
pack, right?
On Sep 28, 2015 4:27 PM, "Florian Sprenger" [email protected]
wrote:

http://docs.nuget.org/create/versioning#Specifying-Version-Ranges-in-.nuspec-Files
:
As of NuGet 1.6, NuGet supports the creation of prerelease packages by
specifying a prerelease string in the version number according to the
Semantic Versioning (SemVer) specification.

also paket update will resolve to the latest prerelease already


Reply to this email directly or view it on GitHub
#1088 (comment).

@flowsprenger
Copy link
Contributor

sounds reasonable to me. if it would apply the following transformations, i think it would mirror how paket update is resolving the packages:

nuget LibraryA >= 0.0.0 prerelease => <dependency id="LibraryA" version="0.0.0-prerelease" />
nuget LibraryA = 0.0.0 prerelease => <dependency id="LibraryA" version="[0.0.0-prerelease]" />
nuget LibraryA >= 0.0.0 => <dependency id="LibraryA" version="0.0.0" />
nuget LibraryA = 0.0.0 => <dependency id="LibraryA" version="[0.0.0]" />

@forki
Copy link
Member

forki commented Sep 28, 2015

What about alpha and beta versions? Paket is making a difference here
On Sep 28, 2015 4:33 PM, "Florian Sprenger" [email protected]
wrote:

sounds reasonable to me. if it would apply the following transformations,
i think it would mirror how paket update is resolving the packages:

nuget LibraryA >= 0.0.0 prerelease =>
nuget LibraryA = 0.0.0 prerelease =>
nuget LibraryA >= 0.0.0 =>
nuget LibraryA = 0.0.0 =>


Reply to this email directly or view it on GitHub
#1088 (comment).

@flowsprenger
Copy link
Contributor

i dont think @devboy has tested the same with alpha & beta versions. unfortunately he is out of office this week. i can try and see if i can create a small testcase later.

@devboy
Copy link
Contributor Author

devboy commented Sep 28, 2015

Nope haven't tested that! Greetings from Greece!

@flowsprenger
Copy link
Contributor

Paket.Pack behaves the same when packing nupkgs that depend on alpha release.
Or do you suspect that the difference in behaviour is for paket update?

@forki
Copy link
Member

forki commented Sep 28, 2015

sorry I don't have a real repro sample at the moment, but I tried to fix it in the dark. could you please try with 2.4.8?

@forki forki added the bug label Sep 29, 2015
@flowsprenger
Copy link
Contributor

thanks for looking into it so quickly. i only looked at it briefly so far but at first glance 2.4.8 does:
nuget LibraryA >= 0.0.0 prerelease => <dependency id="LibraryA" version="0.0.0-prerelease" />
which is good :) but
nuget LibraryA = 0.0.0 prerelease => <dependency id="LibraryA" version="[0.0.0-prerelease]" />
is
nuget LibraryA = 0.0.0 prerelease => <dependency id="LibraryA" version="[0.0.0]" />
which is weird, no? well i don't think we particularly have a usecase for the later either and i am not sure how useful it is to pin to a specific prerelease.

@forki
Copy link
Member

forki commented Sep 29, 2015

mhm. I guess the last one is correct. Specifying a concrete version should always point to that version.
the prerelease info is just not making sense on =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants