Skip to content

Commit

Permalink
Asset: Ignore asset units during import resolving
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jul 24, 2024
1 parent bc50b83 commit 9fe192f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/odoc/bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ module Compile_asset = struct
& info ~docs ~docv:"PATH" ~doc [ "output-dir" ])

let cmd =
let name_opt =
let asset_name =
let doc = "Name of the asset." in
Arg.(
required
Expand All @@ -369,7 +369,7 @@ module Compile_asset = struct
& opt (some string) None
& info ~docs ~docv:"PARENT" ~doc [ "parent-id" ])
in
Term.(const compile_asset $ parent_id $ name_opt $ output_dir)
Term.(const compile_asset $ parent_id $ asset_name $ output_dir)

let info ~docs =
let man =
Expand Down
3 changes: 1 addition & 2 deletions src/odoc/resolver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ let resolve_import t target_name =
| Ok root -> (
match root.Odoc_model.Root.file with
| Compilation_unit _ -> Some root
| Impl _ | Page _ -> loop tl
| Asset _ -> failwith "todo"))
| Impl _ | Page _ | Asset _ -> loop tl))
in
loop (Accessible_paths.find t.ap target_name)

0 comments on commit 9fe192f

Please sign in to comment.