idris2-pack icon indicating copy to clipboard operation
idris2-pack copied to clipboard

[ Feature Request ] Windows support

Open j-nava opened this issue 1 year ago • 2 comments

The installation script works just fine in MSYS2, which is a great step forward, but pack itself fails with the message "[ fatal ] Failed to figure out package directory."

The problem seems to be the filepath library, which only supports Linux-style paths when parsing. Even in MSYS2, environment variables are unfortunately separated by "\", so I believe there's currently no workaround to get pack working.

Is Windows support something we would like to pursue? If so, what would be a good first step? Modifying filepath, adding a new cmd argument to pack, or other solution?

j-nava avatar Mar 05 '23 14:03 j-nava

Sorry for the late reply. Obviously, I'm not a Windows users, so I won't myself be able to test / maintain Windows support. This means that if Windows support breaks and nobody is around to fix it, I'll have to drop it. But I'll definitely accept contributions in this regard.

Currently, I think there are two issues that need to be addressed: First, as you correctly wrote, the idris2-filepath library currently only supports Unix-style file paths. Contributions there are very welcome. Second, many IO operations in Pack.Core.IO (and possibly in Pack.Core.Git) are implemented as syscalls to typical Unix utilities. These would need to be changed in such a way that the syscalls being made work correctly on Windows (if we are on a Windows system).

Finally, I'll only accept contributions together with an update to the docs and an inclusion in our CI tests.

Edit: That being said, I'll of course help with setting up this stuff and figuring the places in the code that need to be adjusted.

stefan-hoeck avatar Mar 28 '23 04:03 stefan-hoeck

For anyone else struggling on Windows: I solved it by using docker and base image ghcr.io/stefan-hoeck/idris2-pack. I then created my own image where I installed neovim and let pack install idris2-lsp.

isberg avatar Jun 30 '24 08:06 isberg