Skip to content

Package names in Dependencies file are case-sensitive #108

Closed

Description

@theimowski

Consider the following dependencies.file:

source "http://nuget.org/api/v2"

nuget "bootstrap" "3.2.0"
nuget "jquery" "1.9.0"

Paket install generates proper lock file:

NUGET
  remote: http://nuget.org/api/v2
  specs:
    bootstrap (3.2.0)
      jquery (>= 1.9.0)
    jquery (1.9.0)

But when changing to "jQuery":

source "http://nuget.org/api/v2"

nuget "bootstrap" "3.2.0"
nuget "jQuery" "1.9.0"

"jQuery" is treated as a different package:

NUGET
  remote: http://nuget.org/api/v2
  specs:
    bootstrap (3.2.0)
      jquery (>= 1.9.0)
    jQuery (1.9.0)
    jquery (2.1.1)

Activity

  1. forki commented on Sep 16, 2014

    @forki
    Member

    Mhm at least the internal model should treat them as one. Can you find a fix?

  2. theimowski commented on Sep 16, 2014

    @theimowski
    MemberAuthor

    Do you think it's worth to apply Type restriction to a package name to force the value to be always lowercase? I'm thinking of something like http://fsharpforfunandprofit.com/posts/designing-with-types-single-case-dus

  3. forki commented on Sep 16, 2014

    @forki
    Member

    I would not enforce it, but just convert it. The user is not a machine.
    On Sep 16, 2014 11:18 PM, "Tomasz Heimowski" [email protected]
    wrote:

    Do you think it's worth to apply Type restriction to a package name to
    force the value to be always lowercase? I'm thinking of something like
    http://fsharpforfunandprofit.com/posts/designing-with-types-single-case-dus

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

  4. forki commented on Sep 17, 2014

    @forki
    Member

    please test again.

  5. theimowski commented on Sep 17, 2014

    @theimowski
    MemberAuthor

    seems ok now. lock file now looks like this:

    specs:
      bootstrap (3.2.0)
        jquery (>= 1.9.0)
      jQuery (1.9.0)
    

    Note the indirect jquery dep is all lowercase, while direct one is not. Wonder if this could hurt one day?

  6. forki commented on Sep 17, 2014

    @forki
    Member

    It will hurt I'm sure.

    This what nuget gives us:

    image

  7. reopened this on Sep 17, 2014
  8. theimowski commented on Sep 17, 2014

    @theimowski
    MemberAuthor

    Is the NuGet API case sensitive? Maybe we could let the users maintain their dependencies case insensitive in dependencies and references files, but after parsing, in the lock file and rest of Paket use only lowercase package names as unique ids?

  9. forki commented on Sep 17, 2014

    @forki
    Member

    nuget seems case insensitive - but I changed it to reflect the "official" package id.

    specs:
      bootstrap (3.2.0)
        jQuery (>= 1.9.0)
      jQuery (1.9.0)
    

    This how it should be now.

  10. ilkerde commented on Sep 20, 2014

    @ilkerde

    If fear I need to reopen. After convert-from-nuget paket fails installing the package. Reason: case-insensitive path check.

    [ilker@x TestPaket]$ paket install
    NUnit.Runners 2.6.3 already downloaded
    NUnit.Runners 2.6.3 already extracted
    NUnit 2.6.3 already downloaded
    NUnit 2.6.3 already extracted
    Paket failed with:
       Directory '/home/ilker/Code/TestPaket/packages/nunit' not found.
    

    ls packages reveals:

    [ilker@x TestPaket]$ ls packages/
    total 20
    drwxr-xr-x 4 ilker users 4096 Aug  3 19:46 FAKE.Core
    drwxr-xr-x 5 ilker users 4096 Sep 20 09:38 NUnit
    drwxr-xr-x 3 ilker users 4096 Aug  3 20:28 NUnit.2.6.3
    drwxr-xr-x 5 ilker users 4096 Sep 20 09:38 NUnit.Runners
    drwxr-xr-x 3 ilker users 4096 Aug  3 20:48 NUnit.Runners.2.6.3
    

    I think this is related to 48b3719. Sorry, I tried to fix myself, but my understanding is still too limited that I could fix on my own. I possibly would like to utilize the "official names" as done with ca055c3

  11. forki commented on Sep 20, 2014

    @forki
    Member

    please run `paket install -v" for the stacktrace

  12. added a commit that references this issue on Oct 29, 2015
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions