Commit 5c6830bb authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Fix #3335 by not passing build arguments if not supported.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent a53ea55c
......@@ -2352,7 +2352,11 @@ setupHsBuildFlags _ _ verbosity builddir =
setupHsBuildArgs :: ElaboratedConfiguredPackage -> [String]
setupHsBuildArgs elab@(ElaboratedConfiguredPackage { elabPkgOrComp = ElabPackage _ })
-- Fix for #3335, don't pass build arguments if it's not supported
| elabSetupScriptCliVersion elab >= Version [1,17] []
= map (showComponentTarget (packageId elab)) (elabBuildTargets elab)
| otherwise
= []
setupHsBuildArgs (ElaboratedConfiguredPackage { elabPkgOrComp = ElabComponent _ })
= []
......
......@@ -122,6 +122,11 @@ Extra-Source-Files:
tests/IntegrationTests/regression/t3199/Main.hs
tests/IntegrationTests/regression/t3199/Setup.hs
tests/IntegrationTests/regression/t3199/test-3199.cabal
tests/IntegrationTests/regression/t3335.sh
tests/IntegrationTests/regression/t3335/A.hs
tests/IntegrationTests/regression/t3335/Setup.hs
tests/IntegrationTests/regression/t3335/cabal.project
tests/IntegrationTests/regression/t3335/t3335.cabal
tests/IntegrationTests/sandbox-reinstalls/p/Main.hs
tests/IntegrationTests/sandbox-reinstalls/p/p.cabal
tests/IntegrationTests/sandbox-reinstalls/q/Q.hs
......
......@@ -10,3 +10,19 @@ die() {
echo "die: $@"
exit 1
}
require_ghc_le() {
GHCVER="$(echo main = print __GLASGOW_HASKELL__ | runghc -XCPP)"
if [ "$GHCVER" -gt "$1" ]; then
echo "Skipping test that needs GHC <= $1 (actual version $GHCVER)"
exit 0
fi
}
require_ghc_ge() {
GHCVER="$(echo main = print __GLASGOW_HASKELL__ | runghc -XCPP)"
if [ "$GHCVER" -lt "$1" ]; then
echo "Skipping test that needs GHC >= $1 (actual version $GHCVER)"
exit 0
fi
}
. ./common.sh
require_ghc_le 706
cd t3335
cabal new-build t3335
import Distribution.Simple
main = defaultMain
name: t3335
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
category: Test
build-type: Custom
cabal-version: >=1.10
library
exposed-modules: A
build-depends: base
default-language: Haskell2010
custom-setup
setup-depends: Cabal == 1.16.*, base
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment