Skip to content

--create-sourcedirs fails with symlink package #7670

@nojaf

Description

@nojaf

Doing a build with rewatch will not create the lib/bs/.sourcedirs.json file, which reanalyze needs.

let generate_sourcedirs_meta ~name (res : Bsb_file_groups.t) =
let v =
kvs
[
("dirs", arr (Ext_array.of_list_map res.files (fun x -> str x.dir)));
( "generated",
arr
(Array.of_list
@@ Ext_list.fold_left res.files [] (fun acc x ->
Ext_list.flat_map_append x.generators acc (fun x ->
Ext_list.map x.output str))) );
( "pkgs",
arr
(Array.of_list
(Bsb_pkg.to_list (fun pkg path ->
arr [|str (Bsb_pkg_types.to_string pkg); str path|]))) );
]
in
Ext_json_noloc.to_file name v

should be ported as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions