Skip to content

Commit

Permalink
refactor(melange): do not open Super_context (#6702)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Dec 15, 2022
1 parent d1ed7de commit 4a9afe1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/dune_rules/melange_rules.ml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
open Import
module CC = Compilation_context

let ocaml_flags sctx ~dir melange =
let open Memo.O in
let open Super_context in
let* expander = expander sctx ~dir in
let* expander = Super_context.expander sctx ~dir in
let* flags =
let+ ocaml_flags = env_node sctx ~dir >>= Env_node.ocaml_flags in
let+ ocaml_flags =
Super_context.env_node sctx ~dir >>= Env_node.ocaml_flags
in
Ocaml_flags.make_with_melange ~melange ~default:ocaml_flags
~eval:(Expander.expand_and_eval_set expander)
in
build_dir_is_vendored dir >>| function
| true ->
let ocaml_version = (context sctx).version in
with_vendored_flags ~ocaml_version flags
Super_context.build_dir_is_vendored dir >>| function
| false -> flags
| true ->
let ocaml_version = (Super_context.context sctx).version in
Super_context.with_vendored_flags ~ocaml_version flags

let lib_output_dir ~target_dir ~lib_dir =
Path.Build.append_source target_dir
Expand Down

0 comments on commit 4a9afe1

Please sign in to comment.