Skip to content

Commit

Permalink
test(ctypes): add repro for #9300 (#9301)
Browse files Browse the repository at this point in the history
* test(ctypes): add repro for #9300

Signed-off-by: Etienne Millon <me@emillon.org>

* Remove workaround

Signed-off-by: Etienne Millon <me@emillon.org>

---------

Signed-off-by: Etienne Millon <me@emillon.org>
  • Loading branch information
emillon authored Nov 28, 2023
1 parent da1c137 commit f140a17
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions test/blackbox-tests/test-cases/ctypes/types-only.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
When a ctypes description has just a type description, Dune does not setup a
rule for a stubs file it tries to use.
See #9300.

$ cat > dune-project << EOF
> (lang dune 3.7)
> (using ctypes 0.3)
> EOF

$ cat > dune << EOF
> (library
> (name l)
> (ctypes
> (external_library_name none)
> (build_flags_resolver vendored)
> (type_description
> (functor bindings)
> (instance types))
> (generated_entry_point c)))
> EOF

$ cat > bindings.ml << EOF
> module Types(F:Ctypes.TYPE) = struct end
> EOF

$ dune build
File "dune", line 1, characters 0-185:
1 | (library
2 | (name l)
3 | (ctypes
4 | (external_library_name none)
5 | (build_flags_resolver vendored)
6 | (type_description
7 | (functor bindings)
8 | (instance types))
9 | (generated_entry_point c)))
Error: No rule found for libl_stubs.a
[1]

0 comments on commit f140a17

Please sign in to comment.