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

Paket doesn't choose the latest version on paket update. #567

Closed
matthid opened this issue Jan 23, 2015 · 9 comments
Closed

Paket doesn't choose the latest version on paket update. #567

matthid opened this issue Jan 23, 2015 · 9 comments

Comments

@matthid
Copy link
Member

matthid commented Jan 23, 2015

Try paket.depedendencies:

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

nuget RazorEngine

-> paket.lock

NUGET
  remote: https://nuget.org/api/v2
  specs:
    Microsoft.AspNet.Razor (2.0.30506.0) - >= net40 < net45
    RazorEngine (3.3.0)
      Microsoft.AspNet.Razor (>= 2.0.30506.0)

I thought this has something to do with Microsoft.AspNet.Razor but

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

nuget Microsoft.AspNet.Razor >= 3.0.0
nuget RazorEngine

yields

NUGET
  remote: https://nuget.org/api/v2
  specs:
    Microsoft.AspNet.Razor (3.2.2)
    RazorEngine (3.4.2)
      Microsoft.AspNet.Razor (>= 3.0.0)

Which is still not the latest version.

There is also no way to resolve it with Microsoft.Asp.Razor-3

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

nuget Microsoft.AspNet.Razor >= 3.0.0
nuget RazorEngine 3.5.0

yields:

$ .paket/paket.exe update
Paket version 0.24.2.0
found: c:\Projects\Yaaf.AdvancedBuilding\paket.dependencies
Resolving packages:
    - exploring RazorEngine 3.5.0
    - exploring Microsoft.AspNet.Razor 2.0.30506.0
Paket failed with:
        Could not find compatible versions for top level dependency:
     "Microsoft.AspNet.Razor >= 3.0.0"
   Available versions:
     - 2.0.30506.0
   Try to relax the dependency or allow prereleases.

I have no idea what is going on here but this seem really broken,

The only thing that works is

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

nuget Microsoft.AspNet.Razor == 2.0.30506
nuget RazorEngine 3.5.0

which is not what I want.

I can see that this is not specifically a paket issue because the nuspec spec says: "Each group contains zero or more element and a target framework attribute. All references inside a group are installed together if the target framework is compatible with the project's framework profile."
But as it doesn't make sense to install two versions of the same reference (Microsoft.AspNet.Razor in this case) paket could handle this case properly, like nuget does.

I started maintaining the RazorEngine package and I'm not sure how I can fix this without releaseing a bunch of new versions like RazorEngine-4 and RazorEngine-5, but I tried to make RazorEngine-3 compatible with Razor3 and RazorEngine-4 with Razor-4.

It would be nice if it could stay that way. Any help/idea is highly appreciated, Thanks!

@forki
Copy link
Member

forki commented Jan 23, 2015

just for clarification:

source https://nuget.org/api/v2
nuget RazorEngine

should give same as

source https://nuget.org/api/v2
nuget Microsoft.AspNet.Razor == 2.0.30506
nuget RazorEngine 3.5.0

?

@matthid
Copy link
Member Author

matthid commented Jan 23, 2015

No in my opinion it should give the same as

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

nuget Microsoft.AspNet.Razor >= 3.0.0
nuget RazorEngine 3.5.1

Which doesn't work at all...

paket update should try to give you the latest possible versions, right?

@forki
Copy link
Member

forki commented Jan 23, 2015

This kind of framework-dependent nuget dependency is actually not supported at the moment. And honestly it's not really good idea.
That said: I will look into this and try to make it work.

@matthid
Copy link
Member Author

matthid commented Jan 23, 2015

Like I said: I'm open to any kind of workaround (but I don't think uploading a bunch of new Version of RazorEngine is a good idea). The best solution would be to ban all 3.x RazorEngine packages which have Razor-2 in their dependencies and upload a new 2.x version with Razor2 support, but you can't actually remove nuget packages...

@matthid
Copy link
Member Author

matthid commented Jan 23, 2015

Will hiding them hide them from Paket? But then I would break people who depend on net40 but have something like ">= 3.2.2" (which was the last package supporting Razor2) in their dependencies. What I mean with that: they would not pick up a newly uploaded 2.X version. This is a real mess, sorry for that.

@forki
Copy link
Member

forki commented Jan 23, 2015

will try to solve this weekend...

@matthid
Copy link
Member Author

matthid commented Jan 23, 2015

That would be awesome, thanks. But there is actually no real need to hurry,,, Because paket doesn't support this I have a build infrastructure where I can fall-back to nuget for such kind of paket failures.

@forki forki closed this as completed in 74a29dd Jan 25, 2015
@matthid
Copy link
Member Author

matthid commented Jan 28, 2015

While I have not tested every possible edge case for this - it seems to work fine now, thanks!

@forki
Copy link
Member

forki commented Jan 28, 2015

Awesome. Thanks for the feedback

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