Skip to content

Commit 8d62eb6

Browse files
committed
Make tests and benchmarks run again
See the comment added in this commit, further investigation is likely needed.
1 parent f73b34a commit 8d62eb6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/Stack/Package.hs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,17 @@ packageFromPackageDescription packageConfig pkgFlags pkg =
229229
, packageAllDeps = S.fromList (M.keys deps)
230230
, packageHasLibrary = maybe False (buildable . libBuildInfo) (library pkg)
231231
, packageTests = M.fromList
232-
[(T.pack (Cabal.unUnqualComponentName $ testName t), testInterface t) | t <- testSuites pkg
233-
, buildable (testBuildInfo t)]
232+
[(T.pack (Cabal.unUnqualComponentName $ testName t), testInterface t) | t <- testSuites pkg]
233+
-- FIXME: Previously, we only included buildable components
234+
-- here. Since Cabal 2.0, this ended up disabling test running
235+
-- in all cases. Need to investigate if that's a change in
236+
-- Cabal behavior or how we're piping data through the system
237+
-- in response to Cabal data type changes. A cleanup of the
238+
-- PackageConfig datatype (which will probably happen for
239+
-- componentized builds) will likely make all of this clearer.
234240
, packageBenchmarks = S.fromList
235-
[T.pack (Cabal.unUnqualComponentName $ benchmarkName biBuildInfo) | biBuildInfo <- benchmarks pkg
236-
, buildable (benchmarkBuildInfo biBuildInfo)]
241+
[T.pack (Cabal.unUnqualComponentName $ benchmarkName biBuildInfo) | biBuildInfo <- benchmarks pkg]
242+
-- Same comment about buildable applies here too.
237243
, packageExes = S.fromList
238244
[T.pack (Cabal.unUnqualComponentName $ exeName biBuildInfo)
239245
| biBuildInfo <- executables pkg

0 commit comments

Comments
 (0)