haskell / haskell/cabal

cabal test should set GHC_PACKAGE_PATH

Open
#2,358 3 comments 0 reactions 0 assignees View on GitHub
Cabal: other meta: easy type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

I have a package that dynamically loads another package at runtime via hint.

When I build it with a cabal sandbox, the test suite fails to find the other package if run with "cabal test", but works fine when run with "cabal exec".

I guess that "cabal test" should be setting GHC_PACKAGE_PATH like cabal exec does?

I get this with cabal 1.20 and 1.22.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the sandbox behavior with "cabal test" and compare it with "cabal exec" using a package that dynamically loads another package via hint. Trace where GHC_PACKAGE_PATH is established for each command. Done means the test suite can find the dynamically loaded package when run with "cabal test" in a Cabal sandbox.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.