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.
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.
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.
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:
That's great! Regarding that
native
call, I would like to find a way to get rid of it.
Regarding making the
cp -R
call portable, here is a recently added example that should help us write that function:
We might not need to remove
native
calls: https://github.com/ocaml-multicore/eio/pull/738
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 liketrees\foo
, which causes an error when saving the file, sinceoutput\trees
does not exist.
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:
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/
.