commercialhaskell/rio

RIO.Process does not allow to Linux style operations on Windows and vice versa (or I didn't find the way to do it).

Opened this issue · 1 comments

I'm using augmentPath on Windows host trying to prepare Linux style PATH env var to use in Docker in commercialhaskell/stack#5315 . I plan to work around the problem there manually, but maybe it would make sense to add possibility to do it in a clean way from rio?

https://github.com/haskell/filepath which is by Rio to get os specific details like the path separator handles it by exposing 3 modules:

  • System.FilePath.Posix manipulates POSIX/Linux style FilePath values (with / as the path separator).
  • System.FilePath.Windows manipulates Windows style FilePath values (with either \ or / as the path separator, and deals with drives).
  • System.FilePath is an alias for the module appropriate to your platform. (used by rio ATM)

I think there's a pretty deep assumption in RIO.Process that the host and target system are the same, and I'm not sure if it's possible to undo that assumption without complicating that API. I'm open to API suggestions, but I don't know what it would look like myself.