“'myst' reference target not found: b.md#anchor” when building in parallel
See original GitHub issueDescribe the problem
I configured myst_heading_anchors = 2
as documented, but anchor links are giving me this warning if I enable parallelism (sphinx-build -W -j N
for any N
other than 1):
Warning, treated as error:
/tmp/myst-anchor-test/docs/dir/a.md:2:'myst' reference target not found: b.md#anchor
When building without parallelism, there is no warning and the anchor works fine.
Link to your repository or website
https://github.com/andersk/myst-anchor-test
Steps to reproduce
$ pip install Sphinx myst-parser
…
Successfully installed Jinja2-3.0.1 MarkupSafe-2.0.1 Pygments-2.9.0 Sphinx-4.1.2 alabaster-0.7.12 attrs-21.2.0 babel-2.9.1 certifi-2021.5.30 charset-normalizer-2.0.4 docutils-0.17.1 idna-3.2 imagesize-1.2.0 markdown-it-py-1.1.0 mdit-py-plugins-0.2.8 myst-parser-0.15.1 packaging-21.0 pyparsing-2.4.7 pytz-2021.1 pyyaml-5.4.1 requests-2.26.0 snowballstemmer-2.1.0 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 urllib3-1.26.6
$ git clone https://github.com/andersk/myst-anchor-test.git
$ cd myst-anchor-test
$ sphinx-build -W -j2 docs build
Running Sphinx v4.1.2
…
Warning, treated as error:
/tmp/myst-anchor-test/docs/dir/a.md:2:'myst' reference target not found: b.md#anchor
$ sphinx-build -W docs build
Running Sphinx v4.1.2
build succeeded.
The HTML pages are in build.
If you want to reproduce again, rm -rf build
.
The version of Python you’re using
3.9.6
Your operating system
NixOS 21.11
Versions of your packages
$ pip freeze
alabaster==0.7.12
attrs==21.2.0
Babel==2.9.1
certifi==2021.5.30
charset-normalizer==2.0.4
docutils==0.17.1
idna==3.2
imagesize==1.2.0
Jinja2==3.0.1
markdown-it-py==1.1.0
MarkupSafe==2.0.1
mdit-py-plugins==0.2.8
myst-parser==0.15.1
packaging==21.0
Pygments==2.9.0
pyparsing==2.4.7
pytz==2021.1
PyYAML==5.4.1
requests==2.26.0
snowballstemmer==2.1.0
Sphinx==4.1.2
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
urllib3==1.26.6
Additional context
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Its okay, I know why it is, fixing now
Indeed, removing the
myst_anchors
test seems to fix the problem completely: