Closed chris-martin closed 4 months ago
@chris-martin You can also turn off -Wunused-packages
for generated code.
I have this in my stack.yaml
:
ghc-options:
"$locals": -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wpartial-fields -Widentities -Wredundant-constraints -Wcpp-undef -O0 -Wunused-packages
intray-stripe-client: -w # Turn off warnings for the generated code.
Oh thanks, I didn't realize you could add per-package flags in stack.yaml
. This isn't a big deal then.
One of the packages I'm generating seems to have no use of its
unordered-containers
dependency, resulting in a failure withstack build --pedantic
.It would probably be hard to get the code generator to automatically produce a minimal dependency set, but perhaps there could be a setting in the configuration file to manually control which dependencies are included? I might submit a PR if this would be welcome.
Pretty simple workaround, though, is just to postprocess the cabal file.