Skip to content

Commit

Permalink
fix: address code review
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
  • Loading branch information
anmonteiro committed Feb 23, 2023
1 parent 744cb66 commit 8a0f074
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/dune_rules/module_compilation.ml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,14 @@ let melange_args (cctx : Compilation_context.t) (cm_kind : Lib_mode.Cm_kind.t)
Path.Build.to_string (Compilation_context.dir cctx)
in
let src_dir = Path.Build.to_string package_output in
let build_context =
let ctx, _ =
Path.Build.extract_build_context_dir_exn package_output
in
ctx
let build_dir =
(Compilation_context.super_context cctx |> Super_context.context)
.build_dir
in
String.drop_prefix src_dir ~prefix:lib_root_dir
|> Option.value_exn
|> String.drop_prefix_if_exists ~prefix:"/"
|> Path.Build.relative build_context
|> Path.Build.relative build_dir
in

( [ Command.Args.A "--bs-package-name"; A (Lib_name.to_string lib_name) ]
Expand Down

0 comments on commit 8a0f074

Please sign in to comment.