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

hp2any-graph fails on OS X because of canonicalizePath when .hp file is not already there at startup #4

Open
Blaisorblade opened this issue Jul 13, 2014 · 3 comments

Comments

@Blaisorblade
Copy link

When starting on program foo, hp2any-graph will call canonicalizePath on foo.hp.

As tracked by various bugs (e.g. https://ghc.haskell.org/trac/ghc/ticket/5014 and https://ghc.haskell.org/trac/ghc/ticket/4215), canonicalizePath fails on some platforms on non-existing files, and this is not going to get fixed so soon.

For a solution, see for instance this workaround in cabal:
https://github.com/haskell/cabal/pull/1290/files#diff-e6e714c73e4b673ae0433a71cbb85a78L1

Update: more likely, you want in fact canonicalizePathNoThrow:
https://github.com/haskell/cabal/blob/84a76809490f40765f73dddc6c2a2015678db57f/cabal-install/Distribution/Client/Utils.hs#L179

@cobbpg
Copy link
Owner

cobbpg commented Jul 16, 2014

Thanks for the report, I’ll deal with this in the coming days.

@cobbpg
Copy link
Owner

cobbpg commented Jul 23, 2014

I just made the relevant changes. Please tell me if the issue needs further work to fix!

@Blaisorblade
Copy link
Author

Thanks!
But 0.5.4.2 does not seem to help:

$ hp2any-graph -e $(which pts) -- --instance uu --quiet UU.lpts +RTS -hy
hp2any-graph: /Users/pgiarrusso/Documents/Research/Sorgenti/tsr-experiments/pts.hp: canonicalizePath: does not exist (No such file or directory)

I think the problem is here, which was not fixed by 88acbea.

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

2 participants