-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't make recent ppx_inline_test work on Windows #17
Comments
@dra27, do you have any idea how to make this work on windows ? |
I worked around this using additional library https://github.com/db4/ppx_inline_test_enable |
There are possibly hacks to achieve similar behaviour on MSVC, but why is it necessary to use weak linking at all? Does something prevent having |
The idea is that the status change if you link against a special library that is linked when linking a test runner. Some code might inspect this status before the toplevel of this library is evaluated, causing them to see the wrong value. That said, this dance could be done at the OCaml level with some help from the build system. |
@jeremiedimino what's wrong with my solution (additional helper library to enable testing)? |
@db4 what ensures that |
@db4 - sorry, my comment wasn't intended to discount your solution entirely! It does indeed work. Its downside is that it requires the library to be linked in each use-case first. A possibly stronger version might be for the enabling to be done in a |
Well, in the case of |
I see. Well, your solution seems like a reasonable workaround to me. For a long term solution, it seems clear to me that the best way forward is to something similar at the OCaml level, at least it will work on all platforms and will all backends. We'll probably look at this once we have made more progress on the switch from Jenga to Dune inside Jane Street, to avoid duplicating the work between Jenga and Dune. @db4, I can notify if/when we do this, so that you can update your omake setup accordingly. That being said, @dra27 if you have a way to make the current solution based on C weak definitions work on Windows right now, we are happy to integrate it straight away. |
I'm trying to make
ppx_inline_test.v0.12.0
work on Windows. To enable tests it usesthat is overridden in
ppx_inline_test
. The problem is thatCAMLweakdef
is no-op under Windows and the linker always takesbase
variant (base.cma
goes beforeppx_inline_test_lib.cma
) so tests are always disabled. Any idea how to work around this?The text was updated successfully, but these errors were encountered: