Extend flag(os-string) handling to test-suites#52
Conversation
Do you have a reproducer? This sounds like something that needs investigation. |
| main-is: T15.hs | ||
| type: exitcode-stdio-1.0 | ||
| default-language: Haskell2010 | ||
| build-depends: base >=4.13.0.0 && <5, tasty, tasty-hunit, file-io, filepath, temporary |
There was a problem hiding this comment.
We don't need filepath here anymore (same for the other tests)
There was a problem hiding this comment.
I tried dropping the dependency: all tests are importing System.OsPath — and then emit member of the hidden package errors.
Yes; minimized, here. Dockerfile— @hasufell if you try I know, I know, this is chokefull of unsavory "legacy" and "not recommended" approaches — but this faithfully replicates how entire distro lineages are installing haskell things. |
GHC's pkgdb permits having multiple versions of a library installed side-by-side.
So, one can end up with:
— and I certainly did.
In an environment like this,
file-iov0.2.0 succeeds build with--disable-tests, and fails build with--enable-tests. The build system gets confused which package links where, cabal starts making bizarre decisions in itsLinked component graph, and the different PosixPath types stop aligning.This patch prevents that issue, by ensuring that tests always speak the same
PosixPathas the main lib, in any build configuration.commonstanzas andimportare sincecabal-version: 2.2— thus no bump was required. Unfortunately,importis only allowed on the first line of a block.TL;DR: this fixes build with
--enable-testsin uncommon conditions during distro packaging.