Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pkg): allow OCAMLFIND_TOOLCHAIN to be set per context #9449

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/changes/9449.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Allow `OCAMLFIND_TOOLCHAIN` to be set per context in the workspace file
through the `env` stanza. (#9449, @rgrinberg)
3 changes: 1 addition & 2 deletions src/dune_rules/context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ module Group = struct
val instantiate : Context_name.t -> t Memo.t
end = struct
let instantiate_impl name : t Memo.t =
let env = Global.env () in
let* workspace = Workspace.workspace () in
let context =
List.find_exn workspace.contexts ~f:(fun ctx ->
Expand Down Expand Up @@ -602,7 +601,7 @@ module Group = struct
match builder.findlib_toolchain with
| Some _ -> builder
| None ->
(match Env.get env "OCAMLFIND_TOOLCHAIN" with
(match Env.get builder.env "OCAMLFIND_TOOLCHAIN" with
| None -> builder
| Some name ->
{ builder with
Expand Down
Loading