Skip to content

Allow _excluding_ HIE directory #201

@sellout

Description

@sellout

Weeder currently accepts --hie-directory to specify where HIE files are found, but I want to be able to leave that be the default (.) and tell Weeder to skip a particular directory.

This comes up in a project with a number of packages, where we also use direnv. When direnv runs, it creates a cache directory that ends up having unrelated HIE files compiled with a different GHC, so we have a large and dynamic list of .stack-work directories with relevant HIE files, and one directory containing irrelevant HIE files:

.
├── .direnv
│   └── flake-inputs # this contains irrelevant HIE files
├── codebase2
│   ├── codebase
│   │   └── .stack-work
│   ├── codebase-sqlite
│   │   └── .stack-work
│   ├── codebase-sqlite-hashing-v2
│   │   └── .stack-work
│   ├── codebase-sync
│   │   └── .stack-work
│   ├── core
│   │   └── .stack-work
│   ├── util-serialization
│   │   └── .stack-work
│   └── util-term
│       └── .stack-work
├── lib
│   └── orphans
│       ├── network-uri-orphans-sqlite
│       │   └── .stack-work
│       └── uuid-orphans-sqlite
│           └── .stack-work
└── parser-typechecker
    └── .stack-work

So it would be much nicer to exclude that one directory than to keep the whitelist up to date. Like

weeder --exclude-hie-directory .direnv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions