Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set CURRENT_PACKAGE_KEY for every haskell_library rule.
It's needed by several Cabal packages; for example `lens`: https://github.com/ekmett/lens/blob/1aa37c4/src/Control/Lens/Internal/TH.hs#L102 If you don't set it, `lens` defaults to logic like: ``` lensPackageKey = "lens-" ++ showVersion version ``` But that doesn't work as of #222 which makes the package key more complicated. For example the `fuzzyset` package breaks with Hazel: ``` bazel-out/k8-fastbuild/bin/external/haskell_fuzzyset/gen-srcs-fuzzyset/Data/FuzzySet/Lens.hs:17:1: error: * Failed to load interface for `Control.Lens.Type' no unit id matching `lens-4.15.4' was found (This unit ID looks like the source package ID; the real unit ID is `externalZShaskellZUlensZSlens-4.15.4') * In the type signature: _useLevenshtein :: lens-4.15.4:Control.Lens.Type.Lens' FuzzySet Bool | 17 | makeLensesFor | ^^^^^^^^^^^^^... ``` Given that `rules_haskell` has the logic that creates the id string, I think it makes sense for it to set this parameter itself (rather than manually-written rules, or macros that use it like Hazel/cabal2bazel).
- Loading branch information