Skip to content

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

Description

@matthid

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!

Activity

  1. forki commented on Jan 23, 2015

    @forki
    Member

    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
    

    ?

  2. matthid commented on Jan 23, 2015

    @matthid
    MemberAuthor

    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?

  3. forki commented on Jan 23, 2015

    @forki
    Member

    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.

  4. matthid commented on Jan 23, 2015

    @matthid
    MemberAuthor

    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...

  5. matthid commented on Jan 23, 2015

    @matthid
    MemberAuthor

    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.

  6. forki commented on Jan 23, 2015

    @forki
    Member

    will try to solve this weekend...

  7. matthid commented on Jan 23, 2015

    @matthid
    MemberAuthor

    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.

  8. matthid commented on Jan 28, 2015

    @matthid
    MemberAuthor

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

  9. forki commented on Jan 28, 2015

    @forki
    Member

    Awesome. Thanks for the feedback

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions