[ctypes] Add support for cstubs codegen errno parameter#5827
[ctypes] Add support for cstubs codegen errno parameter#5827droyo wants to merge 1 commit intoocaml:mainfrom
Conversation
|
Summoning @mbacarella |
|
awesome! lgtm, though can you add a blackbox test for it @droyo ? @rgrinberg since this adds a config directive, should we bump the ctypes extension syntax version from 0.1 to 0.2? |
defo |
|
Sorry for the delay @mbacarella , I was away from my computer. I added a blackbox test, but it is affected by #5809 (this was actually the change that made me find the issue to begin with). I've not yet rebased it against your tentative fix. |
|
I have locally rebased this against #5816 and verified the test passes. |
738009a to
3c8f570
Compare
|
@droyo could you sign off on the commits? |
|
@droyo thanks for the tests. do you want to take a crack at making the |
src/dune_rules/ctypes_stanza.ml
Outdated
| let syntax = | ||
| Dune_lang.Syntax.create ~name ~desc:"the ctypes extension" | ||
| [ ((0, 1), `Since (3, 0)) | ||
| ; ((0, 2), `Since (3, 0)) ] |
There was a problem hiding this comment.
should this line say `Since (3, 3) ?
@rgrinberg
64a024e to
dadddb1
Compare
|
not sure why the DCO check is failing, there appears to be a sign-off? EDIT: oh, maybe the workflow needs approved to re-run the DCO check (even though that check costs $0) |
This parameter dates back to 2016, and switches the generated code between returning just the C function's return value, to a tuple of (retval, errno). Signed-off-by: David Arroyo <david@aqwari.net>
I think it was because I was missing the < > brackets around the email in the commit message. I fixed that and it's passing now. |
|
The build tests fail on ubuntu and macos 4.14.x because: fine, but why does ubuntu 4.13 succeed? |
|
Merged. Thanks
We don't run the tests on older versions (CI is slow enough already) |
|
was merged to main here 5821266 |
…ne-site, dune-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info, dune-action-plugin and chrome-trace (3.4.0) CHANGES: - Make `dune describe` correctly handle overlapping implementations for virtual libraries (ocaml/dune#5971, fixes ocaml/dune#5747, @esope) - Building the `@check` alias should make sure the libraries and executables don't have dependency cycles (ocaml/dune#5892, @rgrinberg) - [ctypes] Add support for the `errno` parameter using the `errno_policy` field in the ctypes settings. (ocaml/dune#5827, @droyo) - Fix `dune coq top` when it is invoked on files from a subdirectory of the directory containing the associated stanza (ocaml/dune#5784, fixes ocaml/dune#5552, @ejgallego, @rlepigre, @Alizter) - Fix hint when an invalid module name is found. (ocaml/dune#5922, fixes ocaml/dune#5273, @emillon) - The `(cat)` action now supports several files. (ocaml/dune#5928, fixes ocaml/dune#5795, @emillon) - Dune no longer uses shimmed `META` files for OCaml 5.x, solely using the ones installed by the compiler. (ocaml/dune#5916, @dra27) - Fix handling of the `(deps)` field in `(test)` stanzas when there is an `.expected` file. (ocaml/dune#5952, ocaml/dune#5951, fixes ocaml/dune#5950, @emillon) - Ignore insignificant filesystem events. This stops RPC in watch mode from flashing errors on insignificant file system events such as changes in the `.git/` directory. (ocaml/dune#5953, @rgrinberg) - Fix parsing more error messages emitted by the OCaml compiler. In particular, messages where the excerpt line number started with a blank character were skipped. (ocaml/dune#5981, @rgrinberg) - env stanza: warn if some rules are ignored because they appear after a wildcard rule. (ocaml/dune#5898, fixes ocaml/dune#5886, @emillon) - On Windows, XDG_CACHE_HOME is taken to be the `FOLDERID_InternetCache` if unset, and XDG_CONFIG_HOME and XDG_DATA_HOME are both taken to be `FOLDERID_LocalAppData` if unset. (ocaml/dune#5943, fixes ocaml/dune#5808, @nojb)
This parameter dates back to 2016, and switches the generated
code between returning just the C function's return value, to a tuple
of (retval, errno).
Signed-off-by: David Arroyo david@aqwari.net