haskell / haskell/cabal

Feature Request: test-files or per-component data-files

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

Description

At the moment I can add `data-files:` to a project to ensure that certain files will be installed by the application.

`cabal v2-run` will find these, and let me access them from within my test suite.

On the other hand, I often have rather extensive testing data that I don't really consider part of the application. It is only used during `cabal new-test`, but not by the application at large.

I would like to be able to deal with either per-component `data-files:` or some kind of `test-files:` to avoid installing these otherwise useless artifacts onto a user's machine.

Historically I've just left them in the project directory, unmentioned except by `extra-source-files`, but this strategy no longer works when I have a multi-project `cabal.project` file, and may be running the tests from the top level or other project directories.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing data-files handling and how cabal.project multi-project layouts expose files during cabal new-test. Determine whether per-component data-files or test-files best fits the request, then verify that test-only artifacts are available to test components without being installed with the application.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.