Skip to content

cabal run fails on windows due to the long path issue #8841

Closed
@ulysses4ever

Description

@ulysses4ever

Describe the bug
Copied from IRC:

maerwald:
windows cabal test consistently fails: https://github.com/haskell/ghcup-metadata/actions/runs/4396989936/jobs/7699817403#step:3:14665

the same test works with 3.6.2.0: https://github.com/haskell/ghcup-metadata/actions/runs/4397003656/jobs/7699838528

D:\a_temp\foobarbaz\ghcup\ghc\9.4.4\lib../mingw/bin/llvm-ar.exe: error: C:\cabal\script-builds\ff17c4bce8853274ef8c5beb95175084fb96425f714475e54f50bdf49f3b33c6\dist-newstyle\build\x86_64-windows\ghc-9.4.4\fake-package-0\x\cabal-script-main.hs\build\cabal-script-main.hs\cabal-script-main.hs-tmp\Main.p_o.tmp: No such file or directory

yes, there's a regression with long paths on windows

Artem:
any way to check if it works with 3.8.1.0? or how to repro it in general? 'Cause it seems like it cabal runs print $ 1+1, which 3.10 is definitely capable of (even on Windows!). Do I just put the script in a folder with a long path (like above)?

maerwald:
just make sure you don't have CABAL_DIR set and it should reproduce

To Reproduce

No idea.

System information

  • Operating system: Windows
  • cabal, ghc versions: 3.10.1.0, 9.4.4

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions