haskell / haskell/cabal

cabal-install converts the remote repo URI to a file path incorrectly on Windows.

Open
#5,218 1 comment 0 reactions 0 assignees View on GitHub
platform: windows re: config-file type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

This issue is item 4 from #5204, but I wanted to open a separate issue because it doesn't just affect tests.

When the `url` field of the `repository` section of the cabal config file is a file URI, cabal treats its path component as a file path, without applying a conversion:

https://github.com/haskell/cabal/blob/59bb50b7d0c001949cb2c629a12584540636c627/cabal-install/Distribution/Client/GlobalFlags.hs#L248-L249

On Windows, the path is invalid because it contains forward slashes. If the path is an absolute path, hackage-security's path conversion code ends up removing the colon from the path and preventing cabal from reading root.json. There is more detail in https://github.com/haskell/cabal/issues/5204#issue-304234880.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.