This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1 @@
(lang dune 2.4)

View file

@ -0,0 +1,3 @@
(executable
(name exec)
(preprocess (pps ppx)))

View file

@ -0,0 +1,4 @@
(library
(name lib)
(library_flags (-linkall))
(libraries dune-build-info))

View file

@ -0,0 +1 @@
let version () = Option.map Build_info.V1.Version.to_string (Build_info.V1.version ())

View file

@ -0,0 +1 @@
val version : unit -> string option

View file

@ -0,0 +1,5 @@
(library
(name ppx)
(kind ppx_rewriter)
(libraries lib)
(ppx.driver (main Ppx.main)))

View file

@ -0,0 +1 @@
let main () = ()

View file

@ -0,0 +1 @@
val main : unit -> unit

View file

@ -0,0 +1,10 @@
Issue #3336 describes a bug where it's not possible to use dune_build_info from
ppx binaries.
Here we demonstrate that such a ppx .exe is built successfully.
$ dune exec ./executable/exec.exe >/dev/null 2>&1 --verbose
[1]
$ find _build | grep \.exe$
_build/default/.ppx/0747fa92c6bc2f7f4818823e4f8871ab/ppx.exe