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

Pkg operations should be case-sensitive on case-insensitive filesystems #17747

Closed
stevengj opened this issue Aug 1, 2016 · 13 comments
Closed
Labels
packages Package management and loading

Comments

@stevengj
Copy link
Member

stevengj commented Aug 1, 2016

e.g. I shouldn't be able to do Pkg.test("pycall"). Since packages are module names, and module loading is case-sensitive, Pkg should be too.

I just noticed this because Pkg.test("NBinclude") failed for a subtle reason (the tests loaded, but with an altered path) and it took me a while to realize that it was because I had mistyped Pkg.test("NBInclude").

@stevengj stevengj added the packages Package management and loading label Aug 1, 2016
@stevengj
Copy link
Member Author

stevengj commented Aug 1, 2016

(Should be able to use the same machinery as #13542.)

@stevengj
Copy link
Member Author

stevengj commented Aug 2, 2016

cc @malmaud

@jakebolewski
Copy link
Member

I've fixed this, PR forthcoming once I figure out how to add tests.

@stevengj
Copy link
Member Author

@jakebolewski, I also have a patch forthcoming. Can we compare notes?

@jakebolewski
Copy link
Member

Sure, I didn't do anything special. Just made sure all the path relevant path comparisons in Pkg were case sensitive to the package name. @malmaud's code for OSX works for any inodes if you strip out trailing / for directories.

@stevengj
Copy link
Member Author

stevengj commented Aug 22, 2016

See the commit linked above. I moved the isfoo_casesensitive checks to stat.jl. The tricky part was finding the relevant entry points in Pkg. Feel free to steal any part of this patch that is helpful.

I didn't think to strip out a trailing /, though.

@jakebolewski
Copy link
Member

Well the two are pretty much identical sans stripping out trailing /, and yours has docs 👍

@jakebolewski
Copy link
Member

jakebolewski commented Aug 22, 2016

I would advocate that case sensitivity becomes part of the isfile, isdir, ispath API through a keyword argument. But that seems like an API change for 0.6.

@stevengj
Copy link
Member Author

Before we can make it part of the public API, we need to deal with the issue that currently the case is only checked for basename(path) on MacOS.

@stevengj
Copy link
Member Author

Do you want to pull my patch, add your trailing / fix and any other differences, then submit a PR? (Or merge in the other direction if you prefer.)

@stevengj
Copy link
Member Author

(Anyway, the change to the public isfoo API seems like it should go in a separate PR after the Pkg fix.)

@jakebolewski
Copy link
Member

Sure, I can add to that commit.

@simonbyrne
Copy link
Contributor

This is now fixed.

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

No branches or pull requests

3 participants