I produce a small magazine where the source files are organised into a product and component structure.
For each issue, I have a main file with \startproduct <issue no> and then, inside that, several \component[filename] statements, one per article. Each article starts in a standard way, including adding some information to a dataset.
At the end of the issue, the dataset information is retrieved to be printed and this is where strange things start to happen.
Sometimes the whole issue will compile without problems and the dataset information is retrieved perfectly. I can make edits to both the product file and/or any of the component files and it all recompiles to produce a PDF each time.
But at othertimes, something "breaks" and the dataset can't be retrieved or isn't created. Everything else compiles fine but there is simply no data being retrieved from the dataset so nothing to print.
If I go back to the product file and comment out most of the components then it will (99% of the time) 'unbreak' itself and the dataset gets created. Once it has started working again I can then uncomment the rest of the components and it will recompile with all the dataset data present ... until the next time.
Has anyone seen anything like this?
I'm using Lua to retrieve the dataset info and, when it goes wrong, the dataset returned by Lua is a nil value. But the .tua file (not a .tuc) has the full dataset structure included.
I can't produce an MWE as I have no idea what to remove and include - it doesn't seem to matter which components are left or removed in order to fix the problem just as long as several ar removed. In other words, it's not one component file causing the problem. And sometimes commenting out just two components will fix it, othertimes I have to do most of them.
It could be a caching issue - when it goes wrong, reprocessing the product file causes much less to scroll past on the TeXShop log display. And when it is fixed, the first successful run has a much longer log, suggesting that more is being processed.
So, unless someone else has seen the above and has the solution, the first question is: does LMTX cache the result of previous runs to save reprocessing if nothing has changed? If so, how can I force a full reprocess or remove those cache files?
I'm using TeXShop to edit and compile, but running "context product_filename.tex" from the command line makes no difference. Version is 2023.09.26 18:19.