You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the top of SCons/Tool/__init__.py, five scanners are configured with default file extensions, with no regard for their respective backend program's presence.
CScanner=SCons.Scanner.C.CScanner()
DScanner=SCons.Scanner.D.DScanner()
JavaScanner=SCons.Scanner.Java.JavaScanner()
LaTeXScanner=SCons.Scanner.LaTeX.LaTeXScanner()
PDFLaTeXScanner=SCons.Scanner.LaTeX.PDFLaTeXScanner()
ProgramScanner=SCons.Scanner.Prog.ProgramScanner()
SourceFileScanner=SCons.Scanner.ScannerBase({}, name='SourceFileScanner')
SWIGScanner=SCons.Scanner.SWIG.SWIGScanner()
CSuffixes= [".c", ".C", ".cxx", ".cpp", ".c++", ".cc",
".h", ".H", ".hxx", ".hpp", ".hh",
".F", ".fpp", ".FPP",
".m", ".mm",
".S", ".spp", ".SPP", ".sx"]
DSuffixes= ['.d']
IDLSuffixes= [".idl", ".IDL"]
LaTeXSuffixes= [".tex", ".ltx", ".latex"]
SWIGSuffixes= ['.i']
forsuffixinCSuffixes:
SourceFileScanner.add_scanner(suffix, CScanner)
forsuffixinDSuffixes:
SourceFileScanner.add_scanner(suffix, DScanner)
forsuffixinSWIGSuffixes:
SourceFileScanner.add_scanner(suffix, SWIGScanner)
# FIXME: what should be done here? Two scanners scan the same extensions,# but look for different files, e.g., "picture.eps" vs. "picture.pdf".# The builders for DVI and PDF explicitly reference their scanners# I think that means this is not needed???forsuffixinLaTeXSuffixes:
SourceFileScanner.add_scanner(suffix, LaTeXScanner)
SourceFileScanner.add_scanner(suffix, PDFLaTeXScanner)
For at least the LaTeXScanner, this can lead to an error if AllowSubstExceptions() has been set to disallow undefined env variables, because LaTeXScanner is looking for a $LATEXSUFFIXES variable, which gets a default definition from the LaTeX tool.
mwichmann
changed the title
Scanners getting added even when tool is not present, LaTeXScanner error when AllowSubstExceptions() defined
Scanners getting added even when tool is not present, LaTeX scanner error when subst exceptions are ignored
Sep 25, 2024
Describe the bug
At the top of
SCons/Tool/__init__.py
, five scanners are configured with default file extensions, with no regard for their respective backend program's presence.For at least the LaTeXScanner, this can lead to an error if
AllowSubstExceptions()
has been set to disallow undefined env variables, because LaTeXScanner is looking for a$LATEXSUFFIXES
variable, which gets a default definition from the LaTeX tool.Required information
scons
The text was updated successfully, but these errors were encountered: