From 9fe192f459a3fb46206723d134026624f27bea8f Mon Sep 17 00:00:00 2001 From: Paul-Elliot Date: Wed, 24 Jul 2024 08:46:24 +0200 Subject: [PATCH] Asset: Ignore asset units during import resolving Signed-off-by: Paul-Elliot --- src/odoc/bin/main.ml | 4 ++-- src/odoc/resolver.ml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/odoc/bin/main.ml b/src/odoc/bin/main.ml index 16c5d72d68..66fa30775b 100644 --- a/src/odoc/bin/main.ml +++ b/src/odoc/bin/main.ml @@ -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 @@ -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 = diff --git a/src/odoc/resolver.ml b/src/odoc/resolver.ml index 2d2006a728..8610476293 100644 --- a/src/odoc/resolver.ml +++ b/src/odoc/resolver.ml @@ -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)