File tree Expand file tree Collapse file tree 5 files changed +16
-9
lines changed
test/blackbox-tests/test-cases/rocq Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ let term =
122122 | Some (`Extraction extr ) ->
123123 ( Dune_rules.Rocq.Rocq_rules. rocqtop_args_extraction ~sctx ~dir extr rocq_module
124124 , extr.buildable.use_stdlib
125- , " DuneExtraction "
125+ , Dune_rules.Rocq.Rocq_rules. extraction_wrapper_name extr
126126 , extr.buildable.mode )
127127 in
128128 (* Run rocqdep *)
Original file line number Diff line number Diff line change @@ -1245,8 +1245,11 @@ let setup_rocqpp_rules ~sctx ~dir ({ loc; modules } : Rocq_stanza.Rocqpp.t) =
12451245 List. rev_map ~f: mlg_rule mlg_files |> Super_context. add_rules ~loc ~dir sctx
12461246;;
12471247
1248+ let extraction_wrapper_name (s : Rocq_stanza.Extraction.t ) : string =
1249+ " Dune_Extraction_" ^ Rocq_module.Name. to_string (snd s.prelude)
1250+
12481251let setup_extraction_rules ~sctx ~dir ~dir_contents (s : Rocq_stanza.Extraction.t ) =
1249- let wrapper_name = " DuneExtraction " ^ Rocq_module.Name. to_string (snd s.prelude) in
1252+ let wrapper_name = extraction_wrapper_name s in
12501253 let * rocq_module =
12511254 let + rocq = Dir_contents. rocq dir_contents in
12521255 Rocq_sources. extract rocq s
@@ -1315,7 +1318,7 @@ let rocqtop_args_extraction ~sctx ~dir (s : Rocq_stanza.Extraction.t) rocq_modul
13151318 let context = Super_context. context sctx |> Context. name in
13161319 extraction_context ~context ~scope s.buildable
13171320 in
1318- let wrapper_name = " DuneExtraction " ^ Rocq_module.Name. to_string (snd s.prelude) in
1321+ let wrapper_name = extraction_wrapper_name s in
13191322 let boot_type = Bootstrap. make ~scope ~use_stdlib ~wrapper_name rocq_module in
13201323 let boot_flags = Resolve.Memo. read boot_type |> Action_builder. map ~f: Bootstrap. flags in
13211324 let per_file_flags = None in
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ val deps_of
2323 -> Rocq_module. t
2424 -> unit Dune_engine.Action_builder. t
2525
26+ (* * Wrapper name used for the extraction stanza, used for calling [deps_of] on
27+ in `dune rocq top`. *)
28+ val extraction_wrapper_name : Rocq_stanza.Extraction .t -> string
29+
2630(* * ** Rules for Rocq stanzas *)
2731
2832(* * [rocq.theory] stanza rules *)
Original file line number Diff line number Diff line change 4242 Mod2. ml
4343 Mod2. mli
4444 $ ls _build/ default /.*. d | sort
45- _build/ default /. DuneExtractionExtr1 . theory. d
46- _build/ default /. DuneExtractionExtr2 . theory. d
45+ _build/ default /. Dune_Extraction_Extr1 . theory. d
46+ _build/ default /. Dune_Extraction_Extr2 . theory. d
Original file line number Diff line number Diff line change 4444 $ ls _build/ default
4545 Datatypes. ml
4646 Datatypes. mli
47- NDuneExtraction_extract . cmi
48- NDuneExtraction_extract . cmx
49- NDuneExtraction_extract . cmxs
50- NDuneExtraction_extract .o
47+ NDune_Extraction_extract_extract . cmi
48+ NDune_Extraction_extract_extract . cmx
49+ NDune_Extraction_extract_extract . cmxs
50+ NDune_Extraction_extract_extract .o
5151 extract. glob
5252 extract. ml
5353 extract. mli
You can’t perform that action at this time.
0 commit comments