Hello everyone! I'm still stuck at trying to make tup (the latest v0.7.8-20-g1d2fd514 on Windows) ignore writes to some files outside the tup root directory (the details of what I tried and found out can be found below in the message thread).
Unfortunately it seems that Mike is busy with other stuff, as there hasn't been any activity on https://github.com/gittup since November 2018. As this issue is really major road-block in my project, I'm prepared to dig into tup's source code and try to fix this myself. Does anyone have any experience with building tup from source for the Windows platform? Is it better to build it directly on Windows or cross-build it on Linux? Concerning the issue itself it comes from the function create_ignored_file() in src/tup/file.c, which gets called when the path of a written-to-file is matched by a regular expression as specified with the new ^-construction: https://github.com/gittup/tup/blob/ec41e2d901a7959f985c400fa562714eed6babd8/src/tup/file.c#L585 For me it looks like tup fails to find a fitting parent node in its internal tree of nodes where it could attach a child node object for the ignored file. Unfortunately I'm not quire sure how to proceed from here. Does anyone have an idea? Any help is greatly appreciated! Kind regards, Bernhard. On 10.01.2019 21:41, Bernhard wrote: > Hi Mike, > > using the latest tup-v0.7.8-20-g1d2fd514 on Windows I have the > following issue: > > The ignore-unexpected-files feature works as advertised, but only > inside the tup hierarchy. Trying to ignore a write access to a file > outside the tup hierarchy fails with an internal error > (create_ignored_file() didn't get a final pel pointer for file: > D:/Workspace/rogue.txt). > > Tupfile: > : input.txt |> cmd.exe /C COPY %f %o && COPY %f ..\rogue.txt && COPY %f > sub\rogue.txt && COPY %f rogue.txt |> output.txt ^rogue\.txt > > Output of tup: > D:\Workspace\Testcase>D:\Workspace\tup-v0.7.8-20-g1d2fd514\tup.exe --verbose > [ tup ] [0.000s] Scanning filesystem... > [ tup ] [0.078s] Reading in new environment variables... > [ tup ] [0.078s] Parsing Tupfiles... > 0) [0.016s] . > [ ] 100% > [ tup ] [0.094s] No files to delete. > [ tup ] [0.094s] Generating .gitignore files... > [ tup ] [0.187s] Executing Commands... > * 0) cmd.exe /C COPY input.txt output.txt && COPY input.txt ..\rogue.txt && > COPY input.txt sub\rogue.txt && COPY input.txt rogue.txt > 1 file(s) copied. > 1 file(s) copied. > 1 file(s) copied. > 1 file(s) copied. > *** tup messages *** > tup info: Ignoring file 'D:/Workspace/Testcase/rogue.txt' because it matched > the regex 'rogue.txt' > tup info: Ignoring file 'D:/Workspace/Testcase/sub/rogue.txt' because it > matched the regex 'rogue.txt' > tup info: Ignoring file 'D:/Workspace/rogue.txt' because it matched the regex > 'rogue.txt' > tup internal error: create_ignored_file() didn't get a final pel pointer for > file: D:/Workspace/rogue.txt > *** Command failed due to errors processing the output dependencies. > [ ] 100% > *** tup: 1 job failed. > > So all three rogue files are detected, but the one outside the tup > hierarchy causes the internal error. From a quick glance at the tup > sources I would think that's because you can't store information about > files outside the tup hierarchy in the database. > > Any chances you could make this work for files outside the tup > hierarchy though? The project I work on really needs a solution for > this use case... > > Kind regards, Bernhard. > > On 28.09.2018 20:09, Mike Shal wrote: >> Unfortunately tup complains about all unexpectedly written files, not >> just those written inside the hierarchy. Perhaps ignoring those >> outside of the hierarchy would be more consistent since that's how >> inputs are handled. Though I think I'd prefer to change the behavior >> of inputs instead so that full_deps is the default, if it can be done >> in a performant way. >> >> However, I just landed some preliminary support for ignoring >> unexpected files in v0.7.8. So you might be able to ignore them using >> a construction like this: >> >> : |> yourcmd... |> output.o ^/FLEXnet/ >> >> This should ignore any file accesses (both reads and writes) to files >> that contain a directory path "FLEXnet". Note that the feature is >> very new, so it is highly likely there are still some issues with it. >> If you try to use it, I'd appreciate any feedback on whether or not >> it works for your case. >> >> See also: https://github.com/gittup/tup/issues/182#issuecomment-425518883 >> >> -Mike -- -- tup-users mailing list email: [email protected] unsubscribe: [email protected] options: http://groups.google.com/group/tup-users?hl=en --- You received this message because you are subscribed to the Google Groups "tup-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
