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

Double path seaparators #108

Open
nponeccop opened this issue Aug 20, 2013 · 4 comments
Open

Double path seaparators #108

nponeccop opened this issue Aug 20, 2013 · 4 comments

Comments

@nponeccop
Copy link

When doing cabal-dev install I get the following message:

Installing library in
C:\Users\foo\bar\cabal-dev//lib\profunctors-3.3.0.1/ghc-7.4.2

Same double forward slashes appear on Linux with GHC 7.6.3

@NobbZ
Copy link

NobbZ commented Feb 25, 2014

I have the same problem!

This is really annoying, since getDataFile "data/data.text" >>= readFile errors because of the superflous /:

$ cabal-dev/bin/test
eulerproject: /home/user/projects/haskell/teststuff/cabal-dev//share/teststuff-0.0.1.0/data/data.txt: openFile: does not exist (No such file or directory)
$ ls /home/user/projects/haskell/teststuff/cabal-dev//share/teststuff-0.0.1.0/data/
problem8.txt

Please note that ls finds the directory and list its contents regardless of the superflous slash!

This makes me wonder, if we should consider the superflous slash as a bug of cabal-dev or the wrong handling of the path as a bug of GHC?

@creswick
Copy link
Owner

@NobbZ your ls listing shows a file "problem8.txt", but the error message states that the file that can't be found is "data.txt"; is it possible that the filesystem changed and that change wasn't propagated to the source that you're compiling? (or, possibly the binary wasn't fully recompiled?)

I haven't seen any issues with double path separators (at least using forward-slashes, back slashes are a different matter). That's not to say there isn't a problem here, though.

As an aside, we're recommending that people move away from cabal-dev, now that cabal-install supports sandboxes natively (in versions >= 1.18). Here's a blog post that describes how to use cabal-install sandboxes: http://coldwa.st/e/blog/2013-07-30-Cabal-sandbox.html

@NobbZ
Copy link

NobbZ commented Feb 25, 2014

That there is a file named problem8.txt is a matter of disguising the original code :) I just forgot to change it after copying.

But I'll take a look into the cabal-install sandbox then. Perhaps you should do a change to README and write your recommondation there in the first few lines.

@creswick
Copy link
Owner

Good point re: README. I've added a note to the top.

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

3 participants