You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: release-notes/Cabal-3.12.0.0.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,42 @@ Cabal and Cabal-syntax 3.12.0.0 changelog and release notes
83
83
84
84
### Other changes
85
85
86
+
- Installing a library with a Custom setup no longer requires building the executable [#9777](https://github.com/haskell/cabal/issues/9777) [#9650](https://github.com/haskell/cabal/pull/9650) [#10311](https://github.com/haskell/cabal/pull/10311)
87
+
88
+
For example, if we have `pkg-a.cabal`:
89
+
90
+
```
91
+
library
92
+
build-depends: pkg-b
93
+
```
94
+
95
+
and `pkg-b.cabal`:
96
+
97
+
```
98
+
library
99
+
exposed-modules: ...
100
+
101
+
executable pkg-b-exe
102
+
main-is: ...
103
+
```
104
+
105
+
106
+
An invocation `cabal build pkg-a` will build `lib:pkg-a` and `lib:pkg-b`, but
107
+
not `exe:pkg-b-exe` because it is not needed for building `pkg-a`! Previously the executable would be built unnecessarily.
108
+
109
+
If the invocation were `cabal build pkg-a exe:pkg-b-exe` then all `lib:pkg-a`, `lib:pkg-b`, and `exe:pkg-b-exe` would be built.
110
+
111
+
Note: There may be a package whose Custom setup expects the executable to be
112
+
built together with the library always. Unfortunately, this is a breaking
113
+
change for them. To migrate, packages should no longer assume the executable is
114
+
built when only the library is requested (e.g. `cabal install --lib Agda` will
115
+
*not* build the `Agda` executable, while `cabal install Agda` will).
116
+
117
+
Agda is an example of a package which expected in its `Setup.hs` copy hook the
118
+
executable to already be built. This was fixed by inspecting the copy arguments
119
+
and making sure we only use the executable when it is built, since it is only
120
+
needed when the executable too is needed.
121
+
86
122
- `cabal init` should not suggest Cabal < 2.0 [#8680](https://github.com/haskell/cabal/issues/8680) [#8700](https://github.com/haskell/cabal/pull/8700)
87
123
88
124
'cabal init' no longer suggests users to set cabal-version to less than
0 commit comments