Open ag-eitilt opened 2 weeks ago
Potential difficulties with this are how it would still work with globs, as well as where the database has been copied elsewhere.
Very difficult to track both the workspace root and the current directory, and resolve contradictions between those. Paths will still be relative to the wakeroot, but how would you know what to munge?
One of a family of scenarios that seems particularly tricky:
/src$ wake <invocation that writes to build/ouput.txt>
/src$ cp wake.db /tmp
/src$ cd /tmp
/src$ touch .wakeroot
/tmp$ mkdir foo
/tmp$ cd foo
/tmp/foo$ wake -o output.txt
Currently,
wake -o
queries the file relative to the workspace root, even if the current directory is elsewhere:The more natural UX would be to prepend the path from the workspace root to the current directory to
-o
and-i
arguments, so that the first form would work; however doing so would break the second form. I personally think that's an acceptable tradeoff, but I'm certainly willing to be convinced otherwise.