rules_haskell
rules_haskell copied to clipboard
Revise ghc_wrapper.sh
The script haskell/private/ghc_wrapper.sh
is growing (especially with #1771 ). This lead to design flaws, to avoid making more computation in the bash file, some arguments which could be easily reconstructed are computed in the Bazel file calling the wrapper, leading to redundancies in the information provided to the wrapper. (see https://github.com/tweag/rules_haskell/pull/1771#discussion_r920155073 )
One solution (proposed by @aherrmann ) could be to create a rather create a Python binary that takes as input a JSON file. This would allow to structure the inputs to the script and more easily separate the purpose of the wrapper and the one of the Bazel rule.
This is not really a feature request, since it should not modify the behavior of rules_haskell
, this would go in a "Refactoring and code cleaning" category if it existed.