commercialhaskell / commercialhaskell/stack

Feature/ `Stack clean --unused` cleans up all files that are not published

Open
#5,371 1 comment 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

Sometimes we use Json or other related data files in our libraries.
They must be listed in `package.yml' `data-files', but we forgot about it.

```yml
data-files:
- test/**/*.gql
- test/**/*.json
```

since they exist in our git repository, it's not really possible to safely verify that all files are listed in `package.yml'.

This causes a problem like this https://github.com/commercialhaskell/stackage/issues/5602, the library is already released but is not built correctly.

We could easily avoid this scenario if we had such a code in our 'ci'.

```bash
stack clean --unused # cleans up all files that are not published
stack install --test
```

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.