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

Wrong error message when failing to resolve packages. #1142

Closed
matthid opened this issue Oct 15, 2015 · 5 comments
Closed

Wrong error message when failing to resolve packages. #1142

matthid opened this issue Oct 15, 2015 · 5 comments

Comments

@matthid
Copy link
Member

matthid commented Oct 15, 2015

While testing I found the following edge case:
Consider the following paket.dependencies

redirects: on
source https://nuget.org/api/v2

//Build
nuget FAKE == 3.36.0
nuget Yaaf.AdvancedBuilding == 0.8.0
nuget FSharp.Formatting == 2.11.1-alpha1
//nuget FSharp.Compiler.Service == 1.3.1.2
//nuget FSharpVSPowerTools.Core == 1.9.0

Paket will complain with

Paket version 2.14.1.0                           
Resolving packages for group Main:               
 - FAKE 3.36.0                                   
 - FSharp.Formatting 2.11.1-alpha1               
 - Yaaf.AdvancedBuilding 0.8.0                   
 - FSharp.Compiler.Service 1.3.1.2               
 - FSharp.Compiler.Service 1.3.1                 
 - FSharp.Compiler.Service 0.0.90                
Paket failed with:                               

Error in resolution.                             
  Resolved:                                      
   - FAKE == 3.36.0                              
   - FSharp.Formatting == 2.11.1-alpha1          
   - Yaaf.AdvancedBuilding == 0.8.0              
   - FSharp.Compiler.Service >= 0.0.90 < 1.4     
  Could not resolve package FAKE:                
   - Dependencies file requested == 3.36.0       
   - Yaaf.AdvancedBuilding 0.8.0 requested 4.0.2 
   - Yaaf.AdvancedBuilding 0.8.0 requested 4.0.2 
 Please try to relax some conditions.            

This is wrong, because we specified (and forced) the FAKE version.
Instead Paket failed to resolve a FSharpVSPowerTools.Core because
Yaaf.AdvancedBuilding requires exactly 1.8 while FSharp.Formatting
requires exactly 1.9.

In fact, the following works as expected:


redirects: on
source https://nuget.org/api/v2

//Build
nuget FAKE == 3.36.0
nuget Yaaf.AdvancedBuilding == 0.8.0
nuget FSharp.Formatting == 2.11.1-alpha1
//nuget FSharp.Compiler.Service == 1.3.1.2
nuget FSharpVSPowerTools.Core == 1.9.0

An other interesting case is


redirects: on
source https://nuget.org/api/v2

//Build
nuget FAKE == 3.36.0
nuget Yaaf.AdvancedBuilding == 0.8.0
nuget FSharp.Formatting == 2.11.1-alpha1
nuget FSharp.Compiler.Service == 1.3.1.2
//nuget FSharpVSPowerTools.Core == 1.9.0

Because in this case Paket will print the correct error message:

Paket version 2.14.1.0                                 
Resolving packages for group Main:                     
 - FAKE 3.36.0                                         
 - FSharp.Formatting 2.11.1-alpha1                     
 - FSharp.Compiler.Service 1.3.1.2                     
 - Yaaf.AdvancedBuilding 0.8.0                         
Paket failed with:                                     

Error in resolution.                                   
  Resolved:                                            
   - FAKE == 3.36.0                                    
   - FSharp.Formatting == 2.11.1-alpha1                
   - FSharp.Compiler.Service == 1.3.1.2                
   - Yaaf.AdvancedBuilding == 0.8.0                    
   - FSharp.Compiler.Service >= 0.0.90 < 1.4           
   - FAKE 4.0.2                                        
   - FSharp.Formatting 2.10.0                          
  Could not resolve package FSharpVSPowerTools.Core:   
   - FSharp.Formatting 2.11.1-alpha1 requested 1.9.0   
   - Yaaf.AdvancedBuilding 0.8.0 requested 1.8.0       
   - FSharp.Formatting 2.11.1-alpha1 requested 1.9.0   
 Please try to relax some conditions.                  

To be clear: The problem is not that paket is failing...
Just the error message is incorrect.

@forki
Copy link
Member

forki commented Oct 15, 2015

wow interesting case. Will look into this tomorrow during train ride.

@forki forki closed this as completed in f545c3c Oct 16, 2015
@forki
Copy link
Member

forki commented Oct 16, 2015

could you please try again?

@matthid
Copy link
Member Author

matthid commented Oct 17, 2015

Yes and in fact after reporting I found a very similar edge case where it was a real bug (where paket failed when it shouldn't) which is now gone as well, very nice! As always thanks for the fast release 👍

@forki
Copy link
Member

forki commented Oct 18, 2015

Mhm, could you please describe the case? I'm a bit worried when we fixed
something other than error messages here. At least we should create an
regression test to track that constellation.
On Oct 17, 2015 10:35 PM, "Matthias Dittrich" notifications@github.com
wrote:

Yes and in fact after reporting I found a very similar edge case where it
was a real bug (where paket failed when it shouldn't) which is now gone as
well, very nice! As always thanks for the fast release [image: 👍]


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

@matthid
Copy link
Member Author

matthid commented Oct 18, 2015

Sure... Consider the following paket.dependencies:

$cat paket.dependencies
redirects: on
source https://nuget.org/api/v2

nuget FAKE == 4.7.0
nuget FSharp.Compiler.Service == 1.4.0.6
nuget FSharp.Formatting == 2.11.1-alpha1
nuget FSharpVSPowerTools.Core == 2.1.0
nuget Yaaf.AdvancedBuilding == 0.5.5

paket.exe update fails with 2.14.2

$paket.exe update
Paket version 2.14.2.0
Resolving packages for group Main:
 - FAKE 4.7.0
 - FSharp.Formatting 2.11.1-alpha1
Paket failed with:
        Could not find compatible versions for top level dependency:
     "FSharpVSPowerTools.Core == 2.1.0 (from c:\Projects\paket.test\paket.dependencies)
     FSharpVSPowerTools.Core 1.9.0 (from FSharp.Formatting 2.11.1-alpha1)"
   Available versions:
     - 2.1.0
     - 2.0.0-beta
     - 1.9.0
     - 1.8.0
     - 1.7.0
     - 1.6.1
     - 1.6.0
     - 1.5.0
     - 1.4.0
     - 1.3.1
     - 1.3.0
     - 1.2.6
     - 1.2.5
     - 1.2.1
   Try to relax the dependency or allow prereleases.                                     

But works with latest/current/2.15.1:

$paket.exe update
Paket version 2.15.1.0
Resolving packages for group Main:
 - FAKE 4.7.0
 - FSharp.Formatting 2.11.1-alpha1
 - FSharpVSPowerTools.Core 2.1.0
 - FSharp.Compiler.Service 1.4.0.6
 - Yaaf.AdvancedBuilding 0.5.5
Locked version resolution written to c:\Projects\paket.test\paket.lock
4 seconds - ready.

I think the current behavior is correct as there is basically nothing to resolve (I resolved everything by hand).

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

No branches or pull requests

2 participants