@@ -799,41 +799,32 @@ resolvePackageDescription packageConfig (GenericPackageDescription desc defaultF
799
799
(packageConfigPlatform packageConfig)
800
800
flags
801
801
802
- -- Due to https://github.com/haskell/cabal/issues/1725,
803
- -- versions of Cabal before 2.0 would always require that the
804
- -- dependencies for all libraries and executables be present,
805
- -- even if they were not buildable. To ensure that Stack is
806
- -- compatible with those older Cabal libraries (which may be
807
- -- in use depending on the snapshot chosen), we set buildable
808
- -- to True for libraries and executables.
809
802
updateLibDeps lib deps =
810
803
lib {libBuildInfo =
811
- (libBuildInfo lib)
812
- { targetBuildDepends = deps
813
- , buildable = True
814
- }
815
- }
804
+ (libBuildInfo lib) {targetBuildDepends = deps}}
816
805
updateExeDeps exe deps =
817
806
exe {buildInfo =
818
- (buildInfo exe)
819
- { targetBuildDepends = deps
820
- , buildable = True
821
- }
822
- }
807
+ (buildInfo exe) {targetBuildDepends = deps}}
808
+
809
+ -- Note that, prior to moving to Cabal 2.0, we would set
810
+ -- testEnabled/benchmarkEnabled here. These fields no longer
811
+ -- exist, and the equivalent functionality shoudl be taken
812
+ -- care of elsewhere (like Stack.Build.Source checking what
813
+ -- components are being built). The only wrinkle in the Cabal
814
+ -- 2.0 story is https://github.com/haskell/cabal/issues/1725,
815
+ -- where older versions of Cabal (which may be used for
816
+ -- actually building code) don't properly exclude
817
+ -- build-depends for non-buildable components. Testing
818
+ -- indicates that everything is working fine, and that this
819
+ -- comment can be completely ignored. I'm leaving the comment
820
+ -- anyway in case something breaks and you, poor reader, are
821
+ -- investigating.
823
822
updateTestDeps test deps =
824
823
test {testBuildInfo =
825
- (testBuildInfo test)
826
- { targetBuildDepends = deps
827
- , buildable = packageConfigEnableTests packageConfig
828
- }
829
- }
824
+ (testBuildInfo test) {targetBuildDepends = deps}}
830
825
updateBenchmarkDeps benchmark deps =
831
826
benchmark {benchmarkBuildInfo =
832
- (benchmarkBuildInfo benchmark)
833
- { targetBuildDepends = deps
834
- , buildable = packageConfigEnableBenchmarks packageConfig
835
- }
836
- }
827
+ (benchmarkBuildInfo benchmark) {targetBuildDepends = deps}}
837
828
838
829
-- | Make a map from a list of flag specifications.
839
830
--
0 commit comments