Would it then be possible to have ConTeXt grind to a complete halt once it encounters a module whose minimum requirements aren't met?
\doifolderversionelse\contextversion{2100.01.01}\normalend\donothing %\doifolderversionelse\contextversion{2009.07.01}\normalend\donothing
\starttext Hello \stoptext
That's great! It's almost what I was looking for ... yet I think \normalend might not be drastic enough ;-) Namely, running this example with context test.tex gives me the following terminal output: --- MTXrun | run 1: luatex --fmt="/Users/oliver/.context/2009-06-13-beta/ luatex-cache/context/18b584d8d585db5fc4cbfa8499d343d8/formats/cont-en" --lua="/Users/oliver/.context/2009-06-13-beta/luatex-cache/context/ 18b584d8d585db5fc4cbfa8499d343d8/formats/cont-en.lui" --backend=pdf "./ general-0002.tex" This is LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009) \write18 enabled. (general-0002.tex color : system all is global activated color : system gray is global activated color : mpcmyk color space is supported color : mpspot color space is supported color : system rgb is global activated color : system all is global activated ConTeXt ver: 2009.06.13 13:37 MKIV fmt: 2009.8.15 int: english/ english system : cont-new loaded (/usr/local/context/2009-06-13-beta/texmf-context/tex/context/base/ cont-new.tex systems : beware: some patches loaded from cont-new.tex (/usr/local/context/2009-06-13-beta/texmf-context/tex/context/base/ cont-new.mkiv) (/usr/local/context/2009-06-13-beta/texmf-context/tex/ context/base/cont-mtx.tex)) system : cont-fil loaded (/usr/local/context/2009-06-13-beta/texmf-context/tex/context/base/ cont-fil.tex loading : ConTeXt File Synonyms ) system : cont-sys.rme loaded (/usr/local/context/2009-06-13-beta/texmf-context/tex/context/user/ cont-sys.rme (/usr/local/context/2009-06-13-beta/texmf-context/tex/ context/base/type-tmf.tex) (/usr/local/context/2009-06-13-beta/texmf- context/tex/context/base/type-siz.tex (/usr/local/context/2009-06-13- beta/texmf-context/tex/context/base/type-siz.mkiv)) (/usr/local/ context/2009-06-13-beta/texmf-context/tex/context/base/type-otf.tex (/ usr/local/context/2009-06-13-beta/texmf-context/tex/context/base/type- otf.mkiv))) system : general-0002.top loaded (general-0002.top) fonts : preloading latin modern fonts bodyfont : 12pt rm is loaded language : language en is active ) mkiv lua stats : used config path - /usr/local/context/ 2009-06-13-beta/texmf/web2c/texmf.cnf mkiv lua stats : used cache path - /Users/oliver/.context/ 2009-06-13-beta mkiv lua stats : input load time - 0.022 seconds mkiv lua stats : stored bytecode data - 170 modules, 45 tables, 215 chunks mkiv lua stats : cleaned up reserved nodes - 18 nodes, 8 lists of 1411 mkiv lua stats : node memory usage - 18 glue_spec, 2 dir mkiv lua stats : loaded patterns - en:us:pat:exc:2 mkiv lua stats : startup time - 0.706 seconds (including runtime option file processing) mkiv lua stats : callbacks - direct: 56, indirect: 4741, total: 4797 mkiv lua stats : loaded fonts - 31 files: lmmono12- regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9- bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf eufb10.tfm eufb7.tfm eufb9.tfm eufm10.tfm eufm7.tfm eufm9.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm mkiv lua stats : fonts load time - 0.369 seconds mkiv lua stats : result saved in file - general-0002.pdf mkiv lua stats : luatex banner - this is luatex, version beta-0.40.5 mkiv lua stats : control sequences - 29596 of 165536 mkiv lua stats : current memory usage - 29 MB (ctx: 29 MB) mkiv lua stats : runtime - 1.242 seconds MTXrun | total runtime: 1.270 --- This states erronously that the result was saved in a PDF file (sixth line from the bottom) although it wasn't (which is correct, of course). What's more important, the exit status of the context command is 0 (via echo $?) indicating that there was no problem at all! This might turn out problematic as soon as documents are processed in a batch run ... (like e.g. a regression test suite ;-)
Since TeX would have to give up on the document anyway perhaps an early bail out could be the more graceful option ... what do you think?
I can add this test to my module together with a message at the terminal.
This would be wonderful! Perhaps one could even integrate this requirement check into the module loading code of the kernel. For example, one might enforce that each valid module has to declare a field like "minkernelversion" in its header ... just thinking out loud. Oliver