TEX builder/logic: A missing file causes failure with poor error message
This issue was originally created at: 2014-08-26 08:49:48.
This issue was reported by: managan.
managan said at 2014-08-26 08:49:48
If a Tex file inputs a missing file the builder errors out and the message is totally obscure. There is a logic flaw that results in a an uninitialized reference that needs to be fixed so we get the LaTeX error message instead of a failure in the builder.
managan said at 2014-08-26 09:54:26
I put a patch for this issue in https://bitbucket.org/managan/scons_newglossary-fix
The test is not working yet. I need to figure out how to run a test and distinguish a bad stderr result from a "good" stderr result.
bdbaddog said at 2015-09-30 19:23:55
Fix typo in summary
@managan - any chance you still have this patch?
Found the original email that prompted this so I think I should be able to find it or reproduce it
I have reproduced this. Could not find the original patch. Need to work on a test.
I reproduced the bug and the fix. No test deck yet. What is the link to the current development process of submitting a branch...
@managan - https://github.com/SCons/scons/wiki/GitWorkflows
Thanks, still at the point of trying to figure out how to distinguish if SCons fails with an exception or just by failing to produce output. The user request was to avoid the exception and have SCons tell you what went wrong.
Are there tests that look for a specific type of failure? Or do you have to write a wrapper to latex like some do and just test the scanning failure...
For clarity I am at this point. The stdout and stderr are expected but cause test.run to fail.
managan@rzalastor1[Scons_managan/scons]{master} python3 runtest.py test/TEX/missingInput.py
1/1 (100.00%) /usr/tce/packages/python/python-3.7.2/bin/python3 test/TEX/missingInput.py
/usr/WS2/managan/Scons_managan/scons/scripts/scons.py returned 2
STDOUT =========================================================================
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cd . && pdftex -interaction=nonstopmode -recorder test.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
restricted \write18 enabled.
entering extended mode
(./test.tex
! I can't find file `{preamble.tex}'.
l.2 \input{preamble.tex}
(Press Enter to retry, or Control-D to exit)
Please type another input file name
! Emergency stop.
l.2 \input{preamble.tex}
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on test.log.
pdftex returned an error, check the log file
scons: building terminated because of errors.
STDERR =========================================================================
scons: *** [test.pdf] Error 1
FAILED test of /usr/WS2/managan/Scons_managan/scons/scripts/scons.py
at line 620 of /usr/WS2/managan/Scons_managan/scons/testing/framework/TestCommon.py (_complete)
from line 723 of /usr/WS2/managan/Scons_managan/scons/testing/framework/TestCommon.py (run)
from line 427 of /usr/WS2/managan/Scons_managan/scons/testing/framework/TestSCons.py (run)
from line 65 of test/TEX/missingInput.py
Any chance you can hop on discord to discuss? https://discord.gg/bXVpWAy