commercialhaskell / commercialhaskell/stack

Feature Request: test- and benchmark-arguments per target configuration

Open
#5,297 0 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

As per stack 2.3.1, it seems to only be possible to define **project-wide** `test-arguments` and `benchmark-arguments` as per:

```yaml
build:
test-arguments: "--fail-fast"
benchmark-opts:
benchmark-arguments: "--output bench.html"
```

However these apply to _all_ test or benchmark targets defined in the `package.yaml`.

I think there's a valid use-case where multiple test or benchmark targets may be specified in the configuration but require different arguments.

For example, in the event of benchmarks using Criterion, it may be useful to have different run times or HTML output files for each configuration, perhaps something like this:

```yaml
benchmarks:
fast-benchmarks:
arguments: "--output bench-fast.html"
slow-benchmarks:
arguments: "--time-limit 60 --output bench-slow.html"
```

With the current project-level benchmark arguments, the HTML output files will all be called the same thing and collide with each other, and there's no finer-grained control of benchmark time limits.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.