blmage / doctest-discover-hpack

Automatically discovers and runs Doctests, based on the current Hpack configuration.
MIT License
1 stars 1 forks source link

Varying behavior across OS #2

Open samtay opened 4 years ago

samtay commented 4 years ago

I have a very strange issue, and I'm actually not sure if it it originates from this package or a subtler stack bug. I have this configuration:

# package.yaml

library:
  source-dirs: src

tests:
  mypackage-test:
    main:                doctest-driver.hs
    ghc-options:
    - -threaded
    - -rtsopts
    - -with-rtsopts=-N
    dependencies:
    - mypackage
    - doctest
    - doctest-discover-hpack
    - QuickCheck

with directory structure

$ tree
├── doctest-driver.hs
├── LICENSE
├── package.yaml
├── mypackage.cabal
├── README.md
├── Setup.hs
├── src
│   └── Chapter1
│       └── IsUnique.hs
├── stack.yaml
├── stack.yaml.lock

and I've played with various permutations of including a source-dirs: . and also moving the doctest-driver.hs file into a separate test directory. The results are the same:

  1. On debian with stack version 2.3.1 x86_64 hpack-0.33.0: stack test finds and tests the doctests in src/Chapter1/IsUnique.hs.
  2. On arch linux with stack version 2.3.1 x86_64 hpack-0.33.0: stack test prints Could not find any testable path. without testing anything in src.

I opened this issue here since that error message is coming from this package. Any ideas?

blmage commented 4 years ago

Sorry for the delay!

As a first hunch, this could be due to some edge case with the System.FilePath functions - I'll try to reproduce/investigate this in the next few days.