janestreet / janestreet/ppx_inline_test

Can't make recent ppx_inline_test work on Windows

Open
#17 9 comments 0 reactions 0 assignees View on GitHub
forwarded-to-js-devs
Dominant language
OCaml
Stars
143
Forks
25
PR merge metrics
No merged PRs in 30d

Description

I'm trying to make `ppx_inline_test.v0.12.0` work on Windows. To enable tests it uses
```C
CAMLprim CAMLweakdef value Base_am_testing()
{
return Val_false;
}
```
that is overridden in `ppx_inline_test`. The problem is that `CAMLweakdef` is no-op under Windows and the linker always takes `base` variant (`base.cma` goes before `ppx_inline_test_lib.cma`) so tests are always disabled. Any idea how to work around this?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Windows build with ppx_inline_test.v0.12.0 and inspect how CAMLweakdef behaves when base.cma is linked before ppx_inline_test_lib.cma. Verify a workaround that enables inline tests on Windows and confirm that the resulting test setup no longer selects the base variant.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.