You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a haskell_library, it's currently possible to export it for consumption by the CC rules using cc_haskell_import. But a haskell_binary sometimes looks pretty similar to a haskell_library. It might not have a ghc-pkg database entry associated to it, but if it's compiled with -dynamic -pie, then it looks and smells so much like any odd shared library that the file command would be fooled. We use this property in sparkle, where we routinely compile PIE binaries and then dlopen() them like any other shared object.
This problem perhaps points to a deeper one: HaskellPackageInfo is likely too monolithic. It could make sense to split it out into multiple providers focused on specific aspects of the produced artifact, much like the Go rules do (GoLibrary, GoArchive, GoArchiveData etc). See https://github.com/bazelbuild/rules_go/blob/master/go/providers.rst.
The text was updated successfully, but these errors were encountered:
The original problem was fixed pretty much entirely, as a side effect of #186. There does remain another problem, which is that cc_haskell_import should ensure the result is always named as a library. Otherwise cc_* rules won't accept the output in the srcs attribute.
Given a
haskell_library
, it's currently possible to export it for consumption by the CC rules usingcc_haskell_import
. But ahaskell_binary
sometimes looks pretty similar to ahaskell_library
. It might not have aghc-pkg
database entry associated to it, but if it's compiled with-dynamic -pie
, then it looks and smells so much like any odd shared library that thefile
command would be fooled. We use this property in sparkle, where we routinely compile PIE binaries and thendlopen()
them like any other shared object.This problem perhaps points to a deeper one:
HaskellPackageInfo
is likely too monolithic. It could make sense to split it out into multiple providers focused on specific aspects of the produced artifact, much like the Go rules do (GoLibrary
,GoArchive
,GoArchiveData
etc). See https://github.com/bazelbuild/rules_go/blob/master/go/providers.rst.The text was updated successfully, but these errors were encountered: