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: link time code gen + implicit transtive deps #6642

Merged
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
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Unreleased
----------

- Fix the compilation of modules generated at link time when
`implicit_transitive_deps` is enabled (#6642, @rgrinberg)

- Allow `$ dune utop` to load libraries defined in data only directories
defined using `(subdir ..)` (#6631, @rgrinberg)

Expand Down
4 changes: 4 additions & 0 deletions src/dune_rules/compilation_context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,15 @@ let for_module_generated_at_link_time cctx ~requires ~module_ =
Ocaml.Version.supports_opaque_for_mli ctx.version
in
let modules = singleton_modules module_ in
let includes =
Includes.make ~project:(Scope.project cctx.scope) ~opaque ~requires
in
{ cctx with
opaque
; flags = Ocaml_flags.empty
; requires_link = Memo.lazy_ (fun () -> requires)
; requires_compile = requires
; includes
; modules
}

Expand Down
4 changes: 0 additions & 4 deletions test/blackbox-tests/test-cases/link-time-transitive-deps.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ Link time code generation should work with implicit transitive deps
> EOF

$ dune build ./bar.exe
File ".bar.eobjs/build_info_data.ml-gen", line 1:
Error: Could not find the .cmi file for interface
.bar.eobjs/build_info_data.ml-gen.
[1]