haskell / haskell/cabal

`cabal repl` doesn't handle boot packages correctly on windows

Open
#9,647 0 comments 0 reactions 0 assignees View on GitHub
needs triage type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Tried with GHC-9.4.8, GHC-9.2.8, cabal-3.6.2.0, cabal-3.10.2.1

```pwsh
PS C:\Users\hasuf> cabal repl -b directory --constraint='directory == 1.3.8.0'
Resolving dependencies...
Build profile: -w ghc-9.2.8 -O1
In order, the following will be built (use -v for more details):
- filepath-1.4.200.1 (lib) (requires build)
- hsc2hs-0.68.10 (exe:hsc2hs) (requires build)
- Win32-2.13.4.0 (lib) (requires build)
- time-1.12.2 (lib:time) (requires build)
- directory-1.3.8.0 (lib:directory) (requires build)
- fake-package-0 (lib) (first run)
Starting hsc2hs-0.68.10 (exe:hsc2hs)
Starting filepath-1.4.200.1 (lib)
Building hsc2hs-0.68.10 (exe:hsc2hs)
Building filepath-1.4.200.1 (lib)
Installing filepath-1.4.200.1 (lib)
Completed filepath-1.4.200.1 (lib)
Installing hsc2hs-0.68.10 (exe:hsc2hs)
Completed hsc2hs-0.68.10 (exe:hsc2hs)
Starting Win32-2.13.4.0 (lib)
Building Win32-2.13.4.0 (lib)
Installing Win32-2.13.4.0 (lib)
Completed Win32-2.13.4.0 (lib)
Starting time-1.12.2 (all, legacy fallback)
Building time-1.12.2 (all, legacy fallback)
Installing time-1.12.2 (all, legacy fallback)
Completed time-1.12.2 (all, legacy fallback)
Starting directory-1.3.8.0 (all, legacy fallback)
Building directory-1.3.8.0 (all, legacy fallback)
Installing directory-1.3.8.0 (all, legacy fallback)
Completed directory-1.3.8.0 (all, legacy fallback)
Configuring library for fake-package-0..
Preprocessing library for fake-package-0..
Warning: No exposed modules
GHCi, version 9.2.8: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from C:\\Users\\hasuf\\AppData\\Local\\Temp\\cabal-repl.-8740\\setcwd.ghci
ghci> import System.Directory

: error:
Ambiguous module name `System.Directory':
it was found in multiple packages:
directory-1.3.6.2 directory-1.3.8.0
```

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.