I'm trying to use redo on a project which produces some very large
output files which I'd prefer to store on a different filesystem. So,
I've created a symlink to a separate data directory, and put my .do
files one level up from it (so I can .gitignore the data directory and
still store the .do files in the repository):
$ ls -l .
lrwxrwxrwx 1 wolf wolf 59 Jan 5 19:39 data -> /media/fe2o3/prdata_202112/
-rw-rw-r-- 1 wolf wolf 86 Jan 5 20:28 default.links.dat.do
Using redo-whichdo, I confirm that this setup works and it can find
the .do file:
$ redo-whichdo data/epzi.links.dat; echo $?
But when I try to actually build the target, it fails:
$ redo data/epzi.links.dat
redo: no rule to redo 'data/epzi.links.dat'
At a guess, it's probably getting confused by the way that '..' in
data/ ends up in a completely different place; I did a bit of
rummaging and it seems like redo-whichdo uses a different algorithm
from redo.paths.find_do_file(), though I couldn't immediately work out
where File.name was coming from.
I get the vague impression that this may not be as trivial to solve as
it looks at first glance—for one, the semantics here are probably
complicated by the fact that there could theoretically be a symlink
somewhere else, with a completely different set of .do files above it.
But maybe redo doesn't consider that any different than what you'd get
if you kept changing the .do files back and forth? I haven't wrapped
my brain around redo enough yet to have a good notion of how this
would fit together.