~jonsterling/forester#6: 
Windows support

Currently this tool works only on unix-style systems; I don't know what it would take to get it to work on Windows, and I don't necessarily want to be the one to do this. But if someone is interested, such support would be welcome.

Status
REPORTED
Submitter
~jonsterling
Assigned to
No-one
Submitted
1 year, 3 days ago
Updated
27 days ago
Labels
blocked

~kentookura 3 months ago

I am using forester regularly on a windows machine using WSL, and that works well.

The ocaml website states that "the next version of opam will focus on closing the gap to fully support windows": https://ocaml.org/docs/ocaml-on-windows#opam-22

When that lands I'll gladly do this. In the meantime I just haven't found a way to install the 5.1.1 compiler on native windows.

~kentookura 2 months ago*

I can report that running opam install --deps-only . succeeds natively on windows, using ocaml 5.0.0 and the new windows support for opam: https://discuss.ocaml.org/t/windows-compiler-support-in-opam-2-2-0-beta2/14648.

~kentookura 2 months ago

I have successfully compiled forester, commit 897258915637265914a117da53bf2af38a58bbad on windows!

https://discuss.ocaml.org/t/windows-compiler-support-in-opam-2-2-0-beta2/14648/26

This isn't proof, but I promise I copied this straight from the windows terminal ;)

❯ forester
forester: required COMMAND name is missing, must be one of 'build', 'complete', 'new' or 'query'.
Usage: forester COMMAND …
Try 'forester --help' for more information.

I can also confirm that forester build works on an empty forest.

The thing that fails for a non-empty forest is this native call:

~jonsterling a month ago

That's great! Regarding that native call, I would like to find a way to get rid of it.

~kentookura a month ago

Regarding making the cp -R call portable, here is a recently added example that should help us write that function:

https://github.com/ocaml-multicore/eio/blob/7d718405a6c3b02745201ebad02002936298fc82/examples/fs/main.ml

~kentookura a month ago

We might not need to remove native calls: https://github.com/ocaml-multicore/eio/pull/738

~kentookura 27 days ago

Made some progress. Program succeeds until it is time to render trees. Current issue is that when calling Eio.Path.split to obtain the address during parsing, the string still has the tree dir attached to it, meaning that trees end up having addresses like trees\foo, which causes an error when saving the file, since output\trees does not exist.

~kentookura 27 days ago

I opened an issue at eio for this.

https://github.com/ocaml-multicore/eio/issues/746

Thinking about how to work around this, I'd like to avoid code like this:

https://github.com/lucasaiu/ocaml/blob/323378a510bda2abd463cfa1888deb9a965e9e87/stdlib/filename.ml#L175

Since windows accepts both forward and backward slashes, this is probably not what we want anyway. I think for now, we can just use String.split _on_char, once with \ and once with /.

Register here or Log in to comment, or comment via email.