Skip to content

Commit

Permalink
Add manifest file for runghc when using cabal_wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Mar 17, 2021
1 parent 4b15deb commit f4f7021
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions haskell/cabal.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -524,13 +524,14 @@ def _haskell_cabal_library_impl(ctx):
if with_profiling:
outputs.append(profiling_library)

(_, runghc_manifest) = ctx.resolve_tools(tools = [ctx.attr._runghc])
json_args = ctx.actions.declare_file("{}_cabal_wrapper_args.json".format(ctx.label.name))
ctx.actions.write(json_args, c.args.to_json())
ctx.actions.run(
executable = c.cabal_wrapper,
arguments = [json_args.path],
inputs = depset([json_args], transitive = [c.inputs]),
input_manifests = c.input_manifests,
input_manifests = c.input_manifests + runghc_manifest,
tools = [c.cabal_wrapper, ctx.executable._runghc],
outputs = outputs,
env = c.env,
Expand Down Expand Up @@ -802,13 +803,14 @@ def _haskell_cabal_binary_impl(ctx):
dynamic_file = binary,
transitive_haddocks = _gather_transitive_haddocks(ctx.attr.deps),
)
(_, runghc_manifest) = ctx.resolve_tools(tools = [ctx.attr._runghc])
json_args = ctx.actions.declare_file("{}_cabal_wrapper_args.json".format(ctx.label.name))
ctx.actions.write(json_args, c.args.to_json())
ctx.actions.run(
executable = c.cabal_wrapper,
arguments = [json_args.path],
inputs = depset([json_args], transitive = [c.inputs]),
input_manifests = c.input_manifests,
input_manifests = c.input_manifests + runghc_manifest,
outputs = [
package_database,
binary,
Expand Down

0 comments on commit f4f7021

Please sign in to comment.