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.

Reply via email to