Skip to content

[minor] iflimit regression#2771

Merged
brucemiller merged 3 commits intobrucemiller:masterfrom
dginev:patch-ifcount
Mar 13, 2026
Merged

[minor] iflimit regression#2771
brucemiller merged 3 commits intobrucemiller:masterfrom
dginev:patch-ifcount

Conversation

@dginev
Copy link
Copy Markdown
Collaborator

@dginev dginev commented Mar 10, 2026

Now that a texlive 2025 make formats succeeds with a full load, I started seeing the Dockerized config we use for arXiv fail with a strange "instant Fatal" due to iflimit being exceeded.

Then I looked at the format file and saw:

V('if_count',4154919);

That number has to be 0 at the start of a fresh latexml conversion run, so it is problematic that it got cached during the formats step. Several patch approaches came to mind, but the one that I believe is "Correct" is:

Avoid using the if_count state value in any situation where the IF_LIMIT isn't set. That way make formats never sets it, and we resume with the clean slate from before.

[aside] We have now learned that the texlive 2025 latex 3 kernel used 4.1 million conditionals in building.

[background] To use the conditional limit, our config sets

--preload=[iflimit=3999999]latexml.sty

@dginev dginev requested a review from brucemiller as a code owner March 10, 2026 15:05
@brucemiller
Copy link
Copy Markdown
Owner

But if_count is useful for debugging & tracing as well, so disabling it is not so good.

@dginev
Copy link
Copy Markdown
Collaborator Author

dginev commented Mar 12, 2026

Changed to the discussed strategy of simply omitting these value keys from the precompiled kernel Dump call. A local make format seems to work.

The Dumper file had large changes when latexmllint ran over it -- hope those are OK.

Copy link
Copy Markdown
Owner

@brucemiller brucemiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good; thanks!

@brucemiller brucemiller merged commit 285bb02 into brucemiller:master Mar 13, 2026
15 checks passed
@brucemiller brucemiller deleted the patch-ifcount branch March 13, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants