-
Notifications
You must be signed in to change notification settings - Fork 414
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
ocamlc -pp
needs an absolute path on Windows.
#7235
Comments
I think the problem is not the relative path, but the forward slashes (they are not understood by |
Oh, totally. Backlashes might work, but I had previously |
I am not sure what Dune can do about this issue, though. |
@davesnx in your actual example, I think you did the following:
And running |
Exactly, If I set it via env-vars. I shouldn't use |
If there's a way to point to different scripts or env vars based on the OS, it can be unblocked. |
There are various ways to create a file that depends on the OS. The easiest one is:
This will copy |
I managed to have the executable as binary with
but when running it with Windows I got the same problem with ocamlc:
I'm not sure neither if this is an issue for dune, OCaml or a missing piece of config under Windows Azure. |
Just a side note on this - I don't know exactly which version of windows started to support it, but Windows Vista and above will generally treat forward slashes in paths as valid. Example from the cmd prompt on my Win11 machine (though this is a behavior I've observed since Server 2008, the server equivalent of Vista):
|
I made a repo in GH actions with the same error: https://github.com/davesnx/windows-bash/actions/runs/4364816084/jobs/7632603001#step:5:42 |
I think we are talking about different things. Forward slashes are not understood by |
Ah, yeah it looks like in that particular case of feeding a relative path to cmd.exe things won't work out. If using the full path it should work:
|
This solves the original issue #6326 |
Hi,
While migrating Reason to cram tests, I found something a little rare when running ocamlc on Windows. The CI running Windows with the error is here: https://dev.azure.com/reasonml/reason/_build/results?buildId=954&view=logs&j=bb2dc71e-f3f0-5721-3a31-6b3d9958e8c3&t=3667bf50-9f4f-54f0-1e4d-fdf1bef18185&l=27
I want to compile with
-pp refmt_impl.exe --print binary
and previously it had a script that ensures this path was absolute via cygwin. Such as https://github.com/reasonml/reason/blob/master/formatTest/test.sh#L21-L31As @rgrinberg suggests, here's the bug report.
The text was updated successfully, but these errors were encountered: