Skip to content

Commit

Permalink
Virtual_rules: use copy instead of symlink when copying signatures
Browse files Browse the repository at this point in the history
Fix ocaml#4195
In sandbox, symlink requires rw permissions on the directory of the sources to create a symlink. Copy does not require

Signed-off-by: Danny Willems <[email protected]>
  • Loading branch information
dannywillems committed Feb 15, 2021
1 parent 4fc9ebd commit abf8a74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Unreleased

- Add a META rule for 'compiler-libs.native-toplevel' (#4175, @altgr)

- Use Action_builder.copy instead of Action_build.symlink when copying compiled
interfaces in virtual rules. Fix sandbox installation of implementations of
virtual packages (fixes #4195, @dannywillems)

2.8.2 (21/01/2021)
------------------

Expand Down
2 changes: 1 addition & 1 deletion src/dune_rules/virtual_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let setup_copy_rules_for_impl ~sctx ~dir vimpl =
let vlib_obj_dir = Lib.obj_dir vlib in
let add_rule = Super_context.add_rule sctx ~dir in
let copy_to_obj_dir ~src ~dst =
add_rule ~loc:(Loc.of_pos __POS__) (Action_builder.symlink ~src ~dst)
add_rule ~loc:(Loc.of_pos __POS__) (Action_builder.copy ~src ~dst)
in
let { Lib_config.has_native; ext_obj; _ } = ctx.lib_config in
let { Mode.Dict.byte; native } =
Expand Down

0 comments on commit abf8a74

Please sign in to comment.