Yes, the filenames are an invariant.  The Tupfile is so much cleaner than 
the shell script, but I need it to be agnostic of the filenames (as would 
be expected, except in the case of spaces).

There are a couple of things going on.  This little repro script 
demonstrates both.

@ECHO OFF

MD test
CD test
tup init

rem Sadly, this (and only this) yields the rule
rem 
rem : foreach *.in |> TYPE %f > %o |> %B.out 
rem 
ECHO ^: foreach ^*.in ^|^> TYPE %%f ^> %%o ^|^> %%B.out > Tupfile

ECHO hello > "e.in"
ECHO world > "é.in"

tup


The first problem is with Windows.  The last ECHO line doesn't actually 
create a file called "é.in", but one called "├⌐.in".  So in fact I can't 
really test the intended condition with just a batch file (that I could 
figure, anyway).

The second problem is with Tup.  The output of this script is:

.tup repository initialized.
[ tup ] [0.104s] Scanning filesystem...
[ tup ] [0.229s] Reading in new environment variables...
[ tup ] [0.327s] Parsing Tupfiles...
 1) [0.002s] .
 [ ] 100%
[ tup ] [0.333s] No files to delete.
[ tup ] [0.334s] Generating .gitignore files...
[ tup ] [0.484s] Executing Commands...
 1) [0.021s] TYPE e.in > e.out
 [ ] 100%
[ tup ] [0.640s] Updated.


In other words, Tup doesn't even sense the existence of the "é.in" file, 
at least, not as matching the globbing pattern "*.in".

But if I manually create the file "é.in" and then re-run tup, you get a 
results like my original case:

[ tup ] [0.001s] Scanning filesystem...
[ tup ] [0.122s] Reading in new environment variables...
[ tup ] [0.124s] Parsing Tupfiles...
 1) [0.002s] .
 [ ] 100%
[ tup ] [0.129s] No files to delete.
[ tup ] [0.129s] Generating .gitignore files...
[ tup ] [0.272s] Executing Commands...
* 1) TYPE Θ.in > Θ.out
 *** tup errors ***
tup error: File 'd:\home\gavin\ws\test\é.out' was written to, but is not 
in .tu
p/db. You probably should specify it as an output
 -- Delete: d:\home\gavin\ws\test\é.out
tup error: Expected to write to file 'Θ.out' from cmd 23 but didn't
 *** Command ID=23 ran successfully, but tup failed to save the 
dependencies.
 [ ] 100%
 *** tup: 1 job failed.


I have *massively* reorganized my project to make good use of Tup, and it's 
all been very healthy.  But the filenames are essential to the domain, and 
I have to stop the changes there.  Nor do I see a workaround.

If there is a better way to produce a test case, I'll be happy to write it. 
 I used cmd.exe exclusively to ensure that there was no cygwin confusion, 
but that introduces its own complication.

Thanks,
Gavin

 

-- 
-- 
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