Skip to content

Commit

Permalink
Fix detecting odig files for installation
Browse files Browse the repository at this point in the history
These files are relative to the package rather than the context. Otherwise, they
will not be included in the .install file in composed builds.

Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed May 27, 2019
1 parent fa24bd6 commit 3a34126
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/local_package.ml
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,13 @@ module Of_sctx = struct
let ctx_build_dir = Path.as_in_build_dir_exn ctx.build_dir in
Super_context.packages sctx
|> Package.Name.Map.map ~f:(fun (pkg : Package.t) ->
let pkg_dir = Path.Build.append_source ctx_build_dir pkg.path in
let odig_files =
let files =
Super_context.source_files sctx ~src_path:Path.Source.root in
String.Set.fold files ~init:[] ~f:(fun fn acc ->
if is_odig_doc_file fn then
Path.Build.relative ctx_build_dir fn :: acc
Path.Build.relative pkg_dir fn :: acc
else
acc)
in
Expand Down

0 comments on commit 3a34126

Please sign in to comment.