#Workspace API & file paths 🧵
1 messages · Page 1 of 1 (latest)
For discussion @dreamy sage but not urgent, I know you're busy with the release.
cc <@&946480760016207902> if you're interested
After developing a few modules using the workspace API, I love it so far - the main rough patch is the meaning of filesystem paths - relative and absolute
In short:
-
The meaning of absolute paths is very clear: every workspace exists in a rootfs. That rootfs is either the root of the workspace itself, or the containing git repository. Works fine. We should keep it.
-
The meaning of relative paths is NOT CLEAR. Should it be relative to the workspace directory? To the workdir of the client? To something else? We don't know for sure, and we need more time to figure it out.
Therefore I propose the following:
-
Declare solved the problem of absolute paths. Every workspace has a rootfs, absolute paths are within that rootfs
-
forbid relative paths , for now. This keeps our options open for the future (we can always relax the restriction later).
-
Implement Workspace.path: String!. This returns the (absolute) path of the workspace within the rootfs. This gives the right level of control to modules, without having to rush a decision on relative paths / workdir