Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies:
- base

executables:
myPackage:
myExe:
source-dirs: app
main: Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies:
- base

executables:
myPackage:
myExe:
source-dirs: app
main: Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies:
- base

executables:
myPackage:
myExe:
source-dirs: app
main: Main.hs
4 changes: 2 additions & 2 deletions tests/integration/tests/1659-skip-component/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import StackTest

main :: IO ()
main = do
stack ["build", "--test", "--bench", "--skip", "failing-test", "--skip", "failing-bench", "--skip", "myPackage-failing"]
stack ["build", ":failing-test", ":failing-bench", ":myPackage", ":myPackage-failing", "--skip", "failing-test", "--skip", "failing-bench", "--skip", "myPackage-failing"]
stack ["build", "--test", "--bench", "--skip", "test-failing", "--skip", "bench-failing", "--skip", "myExe-failing"]
stack ["build", ":test-failing", ":bench-failing", ":myExe", ":myExe-failing", "--skip", "test-failing", "--skip", "bench-failing", "--skip", "myExe-failing"]
12 changes: 6 additions & 6 deletions tests/integration/tests/1659-skip-component/files/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ library:
source-dirs: src

executables:
myPackage:
myExe:
source-dirs: app
main: Main.hs
myPackage-failing:
myExe-failing:
source-dirs: app-failing
main: Main.hs

tests:
failing-test:
test-failing:
source-dirs: test
main: Spec.hs
main: Main.hs

benchmarks:
failing-bench:
bench-failing:
source-dirs: bench
main: Bench.hs
main: Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies:
- base

executables:
myPackageA:
myExeA:
source-dirs: app
main: Main.hs
6 changes: 5 additions & 1 deletion tests/integration/tests/3315-multi-ghc-options/Main.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
-- Stack allows one or more GHC options to be specified on the command line.
--
-- See: https://github.com/commercialhaskell/stack/issues/3315

import StackTest.Repl

main :: IO ()
main = do
stack ["build", "--ghc-options=-ddump-simpl -ddump-asm -DBAR -DBAZ"]
stack ["build", "--ghc-options=-ddump-simpl -ddump-asm -DVARIABLE_A -DVARIABLE_B"]
stackRepl ["--ghc-options=-ddump-simpl -ddump-asm"] (pure ())
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
myPackage.cabal

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: issue3520
spec-version: 0.36.0

name: myPackage
version: 0.1.0.0

dependencies:
- base
- mtl

library:
source-dirs: src
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ module Lib where
-- Avoid problems with CPP and HLint
#ifndef __HLINT__

#ifndef BAR
#error BAR isn't defined
#ifndef VARIABLE_A
#error VARIABLE_A isn't defined
#endif

#ifndef BAZ
#error BAZ isn't defined
#ifndef VARIABLE_B
#error VARIABLE_B isn't defined
#endif

#endif
Original file line number Diff line number Diff line change
@@ -1 +1 @@
snapshot: lts-24.37
snapshot: ghc-9.10.3
4 changes: 4 additions & 0 deletions tests/integration/tests/3390-unbuildable-test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
-- Stack ignores test suites that are not buildable.
--
-- See: https://github.com/commercialhaskell/stack/issues/3390

import StackTest

main :: IO ()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
myPackage.cabal
18 changes: 0 additions & 18 deletions tests/integration/tests/3390-unbuildable-test/files/files.cabal

This file was deleted.

10 changes: 10 additions & 0 deletions tests/integration/tests/3390-unbuildable-test/files/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
spec-version: 0.36.0

name: myPackage
version: 0.1.0.0

tests:
myTest:
source-dirs: test
main: Main.hs
buildable: false

This file was deleted.

18 changes: 11 additions & 7 deletions tests/integration/tests/3431-precompiled-works/Main.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import StackTest
import Control.Monad
import Data.List
-- Stack uses pre-compiled immutable packages where it can.
--
-- See: https://github.com/commercialhaskell/stack/issues/3431

import Control.Monad ( unless )
import Data.List ( isInfixOf )
import StackTest

main :: IO ()
main = do
stack ["build", "random-1.1", "--stack-yaml", "custom1/stack.yaml"]
stackCheckStderr ["build", "random-1.1", "--stack-yaml", "custom2/stack.yaml"] $ \out -> do
print out
unless ("precompiled" `isInfixOf` out) $ error "Didn't use precompiled!"
stack ["build", "random-1.1", "--stack-yaml", "custom1/stack.yaml"]
stackCheckStderr ["build", "random-1.1", "--stack-yaml", "custom2/stack.yaml"] $ \out -> do
print out
unless ("precompiled" `isInfixOf` out) $ error "Didn't use precompiled!"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
snapshot: ghc-9.10.3
name: custom1
snapshot: ghc-9.10.3
packages:
- acme-missiles-0.3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
snapshot: ghc-9.10.3
name: custom2
snapshot: ghc-9.10.3
packages:
- acme-missiles-0.2
16 changes: 0 additions & 16 deletions tests/integration/tests/3520-revision-matching/Main.hs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions tests/integration/tests/3533-extra-deps-solver/Main.hs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 6 additions & 1 deletion tests/integration/tests/3574-extra-dep-local/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
-- Stack can target a local extra-dep and distinguishes local extra-deps from
-- local packages, when applying GHC options to local packages.
--
-- See: https://github.com/commercialhaskell/stack/issues/3574

import StackTest

main :: IO ()
main = stack ["build", "foo"]
main = stack ["build", "myPackage"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
myPackage.cabal
3 changes: 0 additions & 3 deletions tests/integration/tests/3574-extra-dep-local/files/foo/Foo.hs

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
spec-version: 0.36.0

name: myPackage
version: 0.1.0.0

dependencies:
- base

library:
source-dirs: src
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module Lib where
4 changes: 2 additions & 2 deletions tests/integration/tests/3574-extra-dep-local/files/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ snapshot: ghc-9.10.3
packages: []

extra-deps:
- foo
- myPackage

ghc-options:
$locals: -bob
$locals: -dummy
14 changes: 9 additions & 5 deletions tests/integration/tests/3591-cabal-warnings-once/Main.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import StackTest
import Data.List (isInfixOf)
-- Stack warns about unknown fields in Cabal files, but only once.
--
-- https://github.com/commercialhaskell/stack/issues/3591

import Data.List ( isInfixOf )
import StackTest

main :: IO ()
main = do
stackCheckStderr ["build", "--dry-run"] $ \str ->
case filter ("unknown-field-name" `isInfixOf`) (lines str) of
[] -> error "unknown-field-name didn't appear once"
case filter ("unknown-cabal-field-name" `isInfixOf`) (lines str) of
[] -> error "unknown-Cabal-field-name didn't appear once"
[_] -> pure ()
_:_:_ -> error "unknown-field-name appeared multiple times"
_:_:_ -> error "unknown-Cabal-field-name appeared multiple times"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
myPackage.cabal
16 changes: 0 additions & 16 deletions tests/integration/tests/3591-cabal-warnings-once/files/foo.cabal

This file was deleted.

Loading
Loading