Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEX builder/logic: A missing file causes failure with poor error message #2972

Open
bdbaddog opened this issue Jan 2, 2018 · 8 comments · May be fixed by #3854
Open

TEX builder/logic: A missing file causes failure with poor error message #2972

bdbaddog opened this issue Jan 2, 2018 · 8 comments · May be fixed by #3854
Assignees
Labels
LaTex LaTex related issues. Version: github

Comments

@bdbaddog
Copy link
Contributor

bdbaddog commented Jan 2, 2018

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

@bdbaddog bdbaddog added P4 Tools Issues related to tools subsystem Version: github labels Jan 2, 2018
@bdbaddog
Copy link
Contributor Author

bdbaddog commented Jan 3, 2021

@managan - any chance you still have this patch?

@managan
Copy link
Contributor

managan commented Jan 4, 2021

Found the original email that prompted this so I think I should be able to find it or reproduce it

@managan
Copy link
Contributor

managan commented Jan 4, 2021

I have reproduced this. Could not find the original patch. Need to work on a test.

@managan
Copy link
Contributor

managan commented Jan 4, 2021

I reproduced the bug and the fix. No test deck yet. What is the link to the current development process of submitting a branch...

@bdbaddog
Copy link
Contributor Author

bdbaddog commented Jan 4, 2021

@managan
Copy link
Contributor

managan commented Jan 4, 2021

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

@managan
Copy link
Contributor

managan commented Jan 4, 2021

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

@bdbaddog
Copy link
Contributor Author

bdbaddog commented Jan 4, 2021

Any chance you can hop on discord to discuss? https://discord.gg/bXVpWAy

@bdbaddog bdbaddog changed the title A missing file causes failure with poor error message TEX builder/logic: A missing file causes failure with poor error message Jan 4, 2021
@bdbaddog bdbaddog added LaTex LaTex related issues. and removed Tools Issues related to tools subsystem labels Jan 4, 2021
@managan managan linked a pull request Jan 4, 2021 that will close this issue
3 tasks
@bdbaddog bdbaddog linked a pull request Jan 4, 2021 that will close this issue
3 tasks
@mwichmann mwichmann removed the P4 label Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LaTex LaTex related issues. Version: github
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants