Closed dfithian closed 2 years ago
As of the last commit, I tested it like this:
transformers
as a dependency to prune-juice.cabal
stack run -- prune-juice --apply apply-no-verify --apply-strategy smart
@mirko-plowtech do you think this fixes your issue? You can test it out by running the following:
stack run -- prune-juice --apply
If you don't want it to prompt before applying, run
stack run -- prune-juice --no-verify
If it messes up your .cabal file, you can try running in "safe" mode with
stack run -- prune-juice --apply --apply-strategy safe
I attempted this on my company's cabal files, which use common
stanzas, and it didn't apply any of the changes. So I'll try to parse the common
stanzas.
@mirko-plowtech do you think this fixes your issue? You can test it out by running the following:
stack run -- prune-juice --apply
If you don't want it to prompt before applying, run
stack run -- prune-juice --no-verify
If it messes up your .cabal file, you can try running in "safe" mode with
stack run -- prune-juice --apply-strategy safe
Sorry the delay, I will try to test it this weekend =)
I'm going to merge this so that some other contributions can be merged on top of it.
Fixes #6
Apply the proposed changes.
If you specify
--apply
, it will ask for confirmation after printing the results for every target. If you also specify--no-verify
, it will apply the changes without confirmation. Haven't actually tested this part yet, but that's the way it should work.One caveat here is that the pretty printing of the package description is different than the input file in a lot of cases, so it will mess up the .cabal file in question. Also I made it ignore package.yaml files. Maybe both of those things should be warnings.
Checklist:
--apply
--no-verify
.cabal
file and ignoringpackage.yaml
test-suite <name> *> indentation *> build-depends <* end-indentation
, overwriting the build-depends, and overwriting.