Use Data-Files without installation
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
As long as I develop a package without Data-Files I can run and test my program locally using `cabal run` and `cabal repl`. As soon as I start to use Data-Files, the trouble begins. If I am in `ghci`/`cabal repl` I cannot simply hit `:reload` (or omit even that, since Haskell modules are not affected by Data-Files) anymore in order to adapt to changes in the Data-Files. I have to run `cabal install`. However, this may fail, since the program is temporarily incorrect.
Is there a way of using the local Data-Files when I do `cabal run` and `cabal repl` and using installed Data-Files when running programs from `.cabal/bin`? A way to achieve this might be Data-Files that are accessed relative to the path of the executable.
Related package: https://hackage.haskell.org/package/executable-path/
Related issue: #4120
Related discussion: http://mail.haskell.org/pipermail/cabal-devel/2017-March/010393.html
Contributor guide
Research direction
Start by reviewing how `cabal run` and `cabal repl` resolve Data-Files, then compare that with programs launched from `.cabal/bin`. Read related issue #4120, the executable-path package, and the linked Cabal discussion. Done means local Data-Files work during development while installed Data-Files remain available to installed executables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100