commercialhaskell / commercialhaskell/stack

Changes to test suite don't trigger rebuild when using auto-discovery. (Regression of #1061)

Open
#5,349 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### General summary/comments (optional)

As in #1061: Project is not rebuilt in response to changes to test suite when using hspec auto-discovery

### Steps to reproduce

```
stack new foo hspec
cd foo
stack test
sed -i 's/idempotent/idempotentish/' test/Data/String/StripSpec.hs
stack test -v
```

### Expected

Some rebuilding and the change has an effect

### Actual

No rebuild. No effect

```
2020-07-22 08:12:50.237416: [debug] Asking for a supported GHC version
2020-07-22 08:12:50.237513: [debug] Installed tools:
- ghc-tinfo6-8.8.3
2020-07-22 08:12:50.237610: [debug] Run process: /sbin/ldconfig -p
2020-07-22 08:12:50.239955: [debug] Process finished in 2ms: /sbin/ldconfig -p
2020-07-22 08:12:50.241055: [debug] Did not find shared library libtinfo.so.5
2020-07-22 08:12:50.241253: [debug] Found shared library libtinfo.so.6 in /usr/lib/
2020-07-22 08:12:50.241290: [debug] Found shared library libncursesw.so.6 in 'ldconfig -p' output
2020-07-22 08:12:50.241329: [debug] Found shared library libgmp.so.10 in 'ldconfig -p' output
2020-07-22 08:12:50.241385: [debug] Did not find shared library libgmp.so.3
2020-07-22 08:12:50.241400: [debug] Potential GHC builds: tinfo6, ncurses6
2020-07-22 08:12:50.241425: [debug] Found already installed GHC builds: tinfo6
2020-07-22 08:12:50.241535: [debug] (SQL) SELECT "id","actual_version","arch","ghc_path","ghc_size","ghc_modified","ghc_pkg_path","runghc_path","haddock_path","cabal_version","global_db","global_db_cache_size","global_db_cache_modified","info","global_dump" FROM "compiler_cache" WHERE "ghc_path"=?; [PersistText "/home/adrianmay/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/bin/ghc-8.8.3"]
2020-07-22 08:12:50.286745: [debug] Loaded compiler information from cache
2020-07-22 08:12:50.287074: [debug] Asking for a supported GHC version
2020-07-22 08:12:50.287161: [debug] Resolving package entries
2020-07-22 08:12:50.287195: [debug] Parsing the targets
2020-07-22 08:12:50.288535: [debug] Checking flags
2020-07-22 08:12:50.288561: [debug] SourceMap constructed
2020-07-22 08:12:50.291932: [debug] Starting to execute command inside EnvConfig
2020-07-22 08:12:50.293270: [debug] Finding out which packages are already installed
2020-07-22 08:12:50.293355: [debug] Run process: /home/adrianmay/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/bin/ghc-pkg-8.8.3 --global --no-user-package-db dump --expand-pkgroot
2020-07-22 08:12:50.321875: [debug] Process finished in 28ms: /home/adrianmay/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/bin/ghc-pkg-8.8.3 --global --no-user-package-db dump --expand-pkgroot
2020-07-22 08:12:50.331799: [debug] Run process: /home/adrianmay/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/bin/ghc-pkg-8.8.3 --user --no-user-package-db --package-db /home/adrianmay/.stack/snapshots/x86_64-linux-tinfo6/af2ebc25f8cddce55dc8c5314d60a5d549488482c677c0f72d6eec5bc9edd5d7/8.8.3/pkgdb dump --expand-pkgroot
2020-07-22 08:12:50.381457: [debug] Process finished in 50ms: /home/adrianmay/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/bin/ghc-pkg-8.8.3 --user --no-user-package-db --package-db /home/adrianmay/.stack/snapshots/x86_64-linux-tinfo6/af2ebc25f8cddce55dc8c5314d60a5d549488482c677c0f72d6eec5bc9edd5d7/8.8.3/pkgdb dump --expand-pkgroot
2020-07-22 08:12:50.383094: [debug] Run process: /home/adrianmay/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/bin/ghc-pkg-8.8.3 --user --no-user-package-db --package-db /home/adrianmay/src/foo/.stack-work/install/x86_64-linux-tinfo6/af2ebc25f8cddce55dc8c5314d60a5d549488482c677c0f72d6eec5bc9edd5d7/8.8.3/pkgdb dump --expand-pkgroot
2020-07-22 08:12:50.410519: [debug] Process finished in 27ms: /home/adrianmay/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/bin/ghc-pkg-8.8.3 --user --no-user-package-db --package-db /home/adrianmay/src/foo/.stack-work/install/x86_64-linux-tinfo6/af2ebc25f8cddce55dc8c5314d60a5d549488482c677c0f72d6eec5bc9edd5d7/8.8.3/pkgdb dump --expand-pkgroot
2020-07-22 08:12:50.411013: [debug] Constructing the build plan
2020-07-22 08:12:50.412848: [debug] (SQL) SELECT "id","directory","type","pkg_src","active","path_env_var","haddock" FROM "config_cache" WHERE "directory"=? AND "type"=?; [PersistText "/home/adrianmay/src/foo/.stack-work/install/x86_64-linux-tinfo6/af2ebc25f8cddce55dc8c5314d60a5d549488482c677c0f72d6eec5bc9edd5d7/8.8.3/",PersistText "lib:foo-0.1.0.0-4YwLxzJSOGgAm43rlxicak"]
2020-07-22 08:12:50.413273: [debug] (SQL) SELECT "id", "config_cache_id", "index", "option" FROM "config_cache_dir_option" WHERE ("config_cache_id"=?) ORDER BY "index"; [PersistInt64 2]
2020-07-22 08:12:50.413488: [debug] (SQL) SELECT "id", "config_cache_id", "index", "option" FROM "config_cache_no_dir_option" WHERE ("config_cache_id"=?) ORDER BY "index"; [PersistInt64 2]
2020-07-22 08:12:50.413633: [debug] (SQL) SELECT "id", "config_cache_id", "ghc_pkg_id" FROM "config_cache_dep" WHERE ("config_cache_id"=?); [PersistInt64 2]
2020-07-22 08:12:50.413750: [debug] (SQL) SELECT "id", "config_cache_id", "component" FROM "config_cache_component" WHERE ("config_cache_id"=?); [PersistInt64 2]
2020-07-22 08:12:50.414533: [debug] Start: getPackageFiles /home/adrianmay/src/foo/foo.cabal
2020-07-22 08:12:50.415503: [debug] Finished in 1ms: getPackageFiles /home/adrianmay/src/foo/foo.cabal
2020-07-22 08:12:50.416692: [debug] Checking if we are going to build multiple executables with the same name
2020-07-22 08:12:50.416755: [debug] Executing the build plan
2020-07-22 08:12:50.417790: [info] foo> test (suite: foo-test)
2020-07-22 08:12:50.417860: [info]
2020-07-22 08:12:50.417924: [debug] Run process within /home/adrianmay/src/foo/: /home/adrianmay/src/foo/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/foo-test/foo-test

Data.String.Strip
strip
removes leading and trailing whitespace
is idempotent
+++ OK, passed 100 tests.

Finished in 0.0123 seconds
2 examples, 0 failures
2020-07-22 08:12:50.481577: [debug] Process finished in 64ms: /home/adrianmay/src/foo/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/foo-test/foo-test
2020-07-22 08:12:50.481614: [info]
2020-07-22 08:12:50.481629: [info] foo> Test suite foo-test passed
```

### Stack version

```
stack --version
Version 2.3.1, Git revision de2a7b694f07de7e6cf17f8c92338c16286b2878 (8103 commits) x86_64 hpack-0.33.0
```

### Method of installation

* Arch linux's pacman, followed by `stack upgrade --force-download`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.