Skip to content

Collect the workarounds for bugs of numba in one guide, with markers that trigger their removal - #1068

Merged
perlinm merged 1 commit into
mainfrom
docs/numba-workaround-markers
Nov 26, 2026
Merged

perlinm merged 1 commit into
mainfrom
docs/numba-workaround-markers

Conversation

@perlinm

@perlinm perlinm commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Motivation

qLDPC works around two bugs in numba's disk cache: clashing names of code compiled in different processes (numba/numba#11016, worked around in #1062) and data files that hold code for another key (numba/numba#10862). As with the Stim workarounds in circuits/stim_workarounds.md, each workaround should state when it can go and how to remove it, and git grep "TEMPORARY until" should list every site.

Changes

numba_workarounds.md has a section for each bug: a short explanation, the trigger for removing the workaround, and the migration steps. Every site of each workaround in _compilation.py and _compilation_test.py carries a marker that names its trigger and section. The explanation of numba/numba#10862 moves from the module docstring of _compilation into the guide. No behavior changes.

Additional notes

The trigger for the second workaround is the property that _KeyCheckedCacheFile provides: numba loads a data file only if its own version saved it for the key that it loads. A fix for numba/numba#10862 alone would not be enough, since environments with different numba versions that share a cache directory also write each other's data files.

…that trigger their removal

numba_workarounds.md has a section for each bug of numba that qLDPC
works around: clashing names of code compiled in different processes
(numba/numba#11016), and data files that hold code for another key
(numba/numba#10862).  Each section gives the trigger for removing its
workaround and the migration steps.  The explanation of the second bug
moves from the docstring of _compilation into the guide.  Every site
carries a marker that names its trigger and section, so that
git grep "TEMPORARY until" lists them.  No behavior changes.

The docstring of _compilation also gains a missing serial comma and a
missing space between sentences.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@perlinm
perlinm merged commit b2156b0 into main Nov 26, 2026
9 checks passed
@perlinm
perlinm deleted the docs/numba-workaround-markers branch November 26, 2026 00:29
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.

1 participant