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

Package names in Dependencies file are case-sensitive #108

Closed
theimowski opened this issue Sep 16, 2014 · 10 comments
Closed

Package names in Dependencies file are case-sensitive #108

theimowski opened this issue Sep 16, 2014 · 10 comments
Labels

Comments

@theimowski
Copy link
Member

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)
@forki
Copy link
Member

forki commented Sep 16, 2014

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

@forki forki added the bug label Sep 16, 2014
@theimowski
Copy link
Member Author

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

@forki
Copy link
Member

forki commented Sep 16, 2014

I would not enforce it, but just convert it. The user is not a machine.
On Sep 16, 2014 11:18 PM, "Tomasz Heimowski" notifications@github.com
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).

@forki forki closed this as completed in 07dea24 Sep 17, 2014
@forki
Copy link
Member

forki commented Sep 17, 2014

please test again.

@theimowski
Copy link
Member Author

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?

@forki
Copy link
Member

forki commented Sep 17, 2014

It will hurt I'm sure.

This what nuget gives us:

image

@theimowski
Copy link
Member Author

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?

forki added a commit that referenced this issue Sep 17, 2014
@forki forki closed this as completed in dfbd422 Sep 17, 2014
@forki
Copy link
Member

forki commented Sep 17, 2014

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.

@ilkerde
Copy link
Contributor

ilkerde commented Sep 20, 2014

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

@ilkerde ilkerde reopened this Sep 20, 2014
@forki
Copy link
Member

forki commented Sep 20, 2014

please run `paket install -v" for the stacktrace

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

No branches or pull requests

3 participants