haskell / haskell/cabal

`cabal install --lib` on `master` always brings `base` into scope

Open
#9,672 9 comments 1 reaction 0 assignees View on GitHub
type: discussion
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
I just noticed that package environments created with `cabal-3.10.2.1` always bring `base` into scope.

1. Is this a bug, or intentional?
2. If intentional, what is the rational?
3. Is there a way to prevent this, reverting to the `cabal-3.10.2.1` behavior?

**To Reproduce**

```
$ cabal-3.10.2.1 install --package-env=foo.env --lib relude && cat foo.env
```
```
package-db /home/sol/.local/state/cabal/store/ghc-9.8.1/package.db
package-id base-4.19.0.0-c1f2
package-id relude-1.2.1.0-99ccbd1e31593ddccbc7a9d9260492b913d75dae58e3f7684fb550a45d957235
```
vs
```
$ cabal-3.10.1.0 install --package-env=foo.env --lib relude && cat foo.env
```
```
clear-package-db
global-package-db
package-db /home/sol/.local/state/cabal/store/ghc-9.8.1/package.db
package-id relude-1.2.1.0-99ccbd1e31593ddccbc7a9d9260492b913d75dae58e3f7684fb550a45d957235
```

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.