Open Blaisorblade opened 10 years ago
Thanks for the report, I’ll deal with this in the coming days.
I just made the relevant changes. Please tell me if the issue needs further work to fix!
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 88acbea9aeddb1ad0ee6b6ebdd2cac20b0477c39.
When starting on program
foo
,hp2any-graph
will callcanonicalizePath
onfoo.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