[NTG-context] No error when loading a non-existent module
mseven at telus.net
Thu Aug 25 02:19:20 CEST 2022
If you load a non-existent module, ConTeXt issues a minor warning, but
otherwise proceeds as normal:
I think that this behaviour should be changed so that a fatal error is
issued when a loaded module cannot be found. Plain TeX, LaTeX, and OpTeX
all throw an error whenever their versions of modules cannot be found, so
ConTeXt is the odd one out here.
There are 3 scenarios that I can think of for when you attempt to load a
module, but it cannot be found:
1. A module provides some new command "\somecommand"
In this case, loading the module will quietly fail, but an undefined
control sequence error will be issued whenever you use
"\somecommand". This disguises the root problem, which is that the
module was never loaded, potentially confusing users.
2. A module changes the layout of a document
In this case, the layout of the document would be unchanged by the
module. If you're looking at every document, then this would be
obvious; however, if you're using some batch processing system, you
could unknowingly send out incorrectly-styled documents quite easily.
3. You load a module that provides some command, then never use it
This is the only case where the new error would break any documents.
However, this case should hopefully be pretty rare since it's
pointless to load a module then never use any of its features.
Making this change could potentially break some documents that currently
work, but I think that this change is worth it, since I'd rather have
something break loudly (throwing an error) rather than silently (producing
a semi-corrupt document).
More information about the ntg-context