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

Can't install prerelease with >= contraint #2514

Open
304NotModified opened this issue Jul 12, 2017 · 30 comments
Open

Can't install prerelease with >= contraint #2514

304NotModified opened this issue Jul 12, 2017 · 30 comments

Comments

@304NotModified
Copy link
Contributor

304NotModified commented Jul 12, 2017

Description

I can't update my package to a prerelease version.

Repro steps

1.run paket update nuget Core version 9.7-PRimageresizeal-r329 (this is a private feed)

Expected behavior

I could update a package to a prerelease version larger than 8.0

Actual behavior

I get the error:

Resolving packages for group Main:
 - Core is pinned to 9.7-PRimageresizeal-r327
 - MVC 9.1.0
   Incompatible dependency: Core >= 8.0 conflicts with resolved version 9.7-PRimageresizeal-r327
   Incompatible dependency: Core >= 8.0 conflicts with resolved version 9.7-PRimageresizeal-r327
 - MVC 9.0.0
   Incompatible dependency: Core >= 8.0 conflicts with resolved version 9.7-PRimageresizeal-r327

I don't get it. 9.7-PRimageresizeal-r327 >= 8.0?
Also tried creating a package with 9.7.0-PRimageresizeal-r327, same result

notes: Updating to 9.6 (non-prerelease) works.

Paket version 5.2.5

Known workarounds

None. Tried also updating the paket.dependencies with the fixed prerelease version, same error

Thanks in advance!

@forki
Copy link
Member

forki commented Jul 12, 2017

can you try newer paket version?

@304NotModified
Copy link
Contributor Author

304NotModified commented Jul 13, 2017

with Paket version 5.6.10, almost the same issue: can't install it

Tried 9.7-PRimageresizeal-r329 and 9.7.0-PRimageresizeal-r329

paket update Core --version 9.7-PRimageresizeal-r329
Paket version 5.6.10
Updating Core to version 9.7-PRimageresizeal-r329 in C:\project\paket.dependencies group Main
Performance:
 - Runtime: 1 second
Paket failed with:
-> Version 9.7-PRimageresizeal-r329 doesn't match the version requirement >= 9.0 < 10.0 for package Core that was specified in paket.dependencies
paket update Core --version 9.7.0-PRimageresizeal-r329
Paket version 5.6.10
Updating Core to version 9.7.0-PRimageresizeal-r329 in C:\project\paket.dependencies group Main
Performance:
 - Runtime: 1 second
Paket failed with:
-> Version 9.7.0-PRimageresizeal-r329 doesn't match the version requirement >= 9.0 < 10.0 for package Core that was specified in paket.dependencies
paket --version
Paket version 5.6.10



@forki
Copy link
Member

forki commented Jul 13, 2017

Ok I think I need a repro.

@304NotModified
Copy link
Contributor Author

I will try an older paket first. It worked and I spent already to much time in installing a package.

@304NotModified
Copy link
Contributor Author

304NotModified commented Jul 13, 2017

mmm even with Paket 4 it won't work.

Tried also constrains like ~> 9, >= 9, <10, > 9.6, < 9.7, all of them won't match the version requirement with "9.7-PRimageresizeal-r329". Tried also "9.7-PRimageresizeal" as package name, the same.

What's the official way to denote a prelease version?

@forki
Copy link
Member

forki commented Jul 13, 2017

does the following line in the deps file work:

 nuget Core == 9.7-PRimageresizeal-r329

?

@304NotModified
Copy link
Contributor Author

 nuget Core 9.7-PRimageresizeal-r329

works, but then it got stuck somewhere else als the requirement in a dependency is >= 8

@forki
Copy link
Member

forki commented Jul 13, 2017

that's why I asked for ==

@304NotModified
Copy link
Contributor Author

304NotModified commented Jul 13, 2017

same as without ==.

Tried now 9.7-beta1 (renamed the package),

got then:

Incompatible dependency: Core >= 8.0 conflicts with resolved version 9.7-beta1

@forki
Copy link
Member

forki commented Jul 13, 2017

What about nuget Core prerelease ?

@304NotModified
Copy link
Contributor Author

yes that works!

@304NotModified
Copy link
Contributor Author

304NotModified commented Jul 13, 2017

for 9.7-beta1 it worked, but not for 9.7-PRtexttemplated-r284

it works for the latest Paket 5.6.10, not Paket 5.2.5

@forki
Copy link
Member

forki commented Jul 13, 2017

OK that are 2 issues now. Give me a sec - I will try something.

But I guess at least you have a workaround for now, right?

@forki
Copy link
Member

forki commented Jul 13, 2017

just for confirmation:

nuget Core 9.7-beta1 did not work
nuget Core prerelease did work

?

@304NotModified
Copy link
Contributor Author

OK that are 2 issues now. Give me a sec - I will try something.

I think it's one issue, updated mu post.

But I guess at least you have a workaround for now, right?

Yes, thanks!

@304NotModified
Copy link
Contributor Author

304NotModified commented Jul 13, 2017

just for confirmation:

nuget Core 9.7-beta1 did not work
nuget Core prerelease did work

?

Indeed

To be complete:

this works: (in paket.dependencies)

  • nuget Core prerelease

this won't (in paket.dependencies)

  • nuget Core 9.7-beta1 - error in dependency, >=8.0
  • nuget Core == 9.7-beta1 - error in dependency, >=8.0
  • nuget Core ~> 9.6 - 9.7-beta1 not in 9.6 - 10
  • nuget Core ~> 9 - 9.7-beta1 not in 9 - 10
  • nuget Core >= 9 - 9.7-beta1 not in 9 - 10
  • nuget Core < 10 - 9.7-beta1 not in < 10
  • nuget Core <= 10- 9.7-beta1 not in <= 10

While doing:

paket update nuget Core version 9.7-beta1

@forki
Copy link
Member

forki commented Jul 13, 2017

ok this is really weird.

I just tried with @Stift's repro from #2471

it has

source Externals/NugetStore

nuget PackageA
nuget PackageB 1.0.11204-custom

and I tried:

paket.exe update nuget PackageB --version 1.0.11204-custom

and it worked with latest paket. Can you spot the difference?

@304NotModified
Copy link
Contributor Author

"nuget PackageB 1.0.11204-custom" could work depending of PackageA.

I'm my repo PackageA has dependency PackageB >= 1.0

@forki
Copy link
Member

forki commented Jul 13, 2017

NUGET
  remote: Externals/NugetStore
    PackageA (1.0.11250)
      PackageB (>= 1.0 < 2.0)
    PackageB (1.0.11204-custom)

@304NotModified
Copy link
Contributor Author

maybe it was the issue that the .lock file was in the old format. I see a lot has been changed. Will try to test that

@304NotModified
Copy link
Contributor Author

does nuget PackageB ~> 1.0 work for

paket.exe update nuget PackageB --version 1.0.11204-custom

?

@forki
Copy link
Member

forki commented Jul 13, 2017

no you need to specify in the deps file that you want a prerelease.
This can be dpne with either:

nuget PackageB 1.0.11204-custom

or

nuget PackageB prerelease

@304NotModified
Copy link
Contributor Author

nuget PackageB ~> 1.0 prelease is also not supported?

@forki
Copy link
Member

forki commented Jul 13, 2017

nuget PackageB ~> 1.0 prelease should work

@304NotModified
Copy link
Contributor Author

304NotModified commented Jul 13, 2017

OK, will test that today. Thanks!

@jamescrowley
Copy link

Is there any way around this without updating the paket.dependencies file? Just hit this today too.

@forki
Copy link
Member

forki commented Jan 3, 2018

@jamescrowley you hit what exactly?

@jamescrowley
Copy link

We have a paket.dependencies file that said:

nuget FundApps.RulePackage.TestApi >= 1.0.34196

and sometimes as part of our build process, we do

.paket\paket.exe update FundApps.RulePackage.TestApi --version 1.0.35691-beta

to test against a beta version, which now fails with

Version 1.0.35691-beta doesn't match the version requirement >= 1.0.34196 for package FundApps.RulePackage.TestApi that was specified in paket.dependencies

Checking with the team, looks like we bumped the version of paket a while back which has probably broken this. Still broken on the latest version of paket.

Is this expected behaviour now, or a bug?

@jamescrowley
Copy link

We bumped from version 3.6.0, which probably isn't that helpful.... (!)

@forki
Copy link
Member

forki commented Jan 3, 2018

mmm I guess it's expected because it conflicts the deps file.

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

No branches or pull requests

4 participants