rules_haskell icon indicating copy to clipboard operation
rules_haskell copied to clipboard

Revise ghc_wrapper.sh

Open GuillaumeGen opened this issue 2 years ago • 1 comments

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.

GuillaumeGen avatar Jul 19 '22 09:07 GuillaumeGen

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.

GuillaumeGen avatar Jul 19 '22 09:07 GuillaumeGen