Closed as not planned
Description
Originally surfaced in haskell/cabal#9334
Hi everyone,
It has recently been found that llvm-ar.exe
cannot handle file paths containing the %
character, leading to a misleading error:
$ cabal run --enable-profiling ./moon.hs
C:/ghcup/ghc/9.6.3/lib/../mingw/bin/llvm-ar.exe: error: C:\\cabal\\script-builds\\%5nVnTgLeh7AaK3jOtq2ERexJN\\build\\x86_64-windows\\ghc-9.6.3\\fake-package-0\\x\\script-moon.hs\\build\\script-moon.hs\\script-moon.hs-tmp\Main.p_o.tmp: No such file or directory
<no location info>: error:
`llvm-ar.exe' failed in phase `Ar'. (Exit code: 1)
The path segment %5nVnTgLeh7AaK3jOtq2ERexJN
here is at fault.
However the error is misleading, because we see a "file not found" message.
If it's too much of a hassle to handle %
in file paths, could the error message be improved so that downstream users can have their own workaround?