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
Allow build-type Configure to work with Components
When components were introduced, cabal had support for
build-type: Configure, which allows to run a `configure`
script prior to building the package. Upon the introduction
of components, it became obvious that we can't just
configure each and every component, as this easily runs
into the situation where the `configure` script is run
potentially concurrently for all components.
However, build-type is a global option for cabal files, and
is usually used to produce a <pkg>.buildinfo file. This file
is then used to augment the Main Library and Executables only.
This change now tracks whether or not we are building a
main library or executable component, and if we do, retains
only for these components the build-type: Configure from the
package description. For all other components, we will fall
back to the default build-type: Simple. For end users who
want to depend on package configured values, they will need
to set their sub libraries, testsuites and benchmark
components to depend on the main library, and import any
configured values from there.
For lib:Cabal, which doesn't know about components
when configure is invoked, we will continue to execute
configure. There is no impact on lib:Cabal in this change.
Copy file name to clipboardExpand all lines: cabal-testsuite/PackageTests/Configure/cabal.out
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ Configuration is affected by the following files:
4
4
Resolving dependencies...
5
5
Build profile: -w ghc-<GHCVER> -O1
6
6
In order, the following will be built:
7
-
- zlib-1.1 (lib:zlib) (first run)
8
-
Configuring zlib-1.1...
7
+
- zlib-1.1 (lib) (first run)
8
+
Configuring library for zlib-1.1...
9
9
Warning: Flags 'con_flict', 'con-flict' all map to the same environment variable 'CABAL_FLAG_con_flict' causing a collision. The value first flag 'con_flict' will be used.
0 commit comments