New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intersphinx references work without a namespace/identifier but fail if used #9682
Comments
Upon further testing, this issue seems rather contrived:
|
Not sure if related to the problems that #9459 hopefully addresses |
@astrojuanlu I gave #9459 a try. Unfortunately, none of the issues seems to be fixed consistently. Problems with 'py' and CamelCase remain. |
Just to be sure, this is not in the default master branch but in |
@jakobandersen, that is correct. I found a workaround in |
No problem, I'll see what I can find out. |
Hmm, this is icky. As you also got towards: I think culprit is an unintended interaction between the way intersphinx repositories are specified and how the Line 589 in a0e986c
But your intersphinx_mapping uses mixed case (which I think is reasonable). If you change the inventory names to lower case the goals will work.However, the Glossary references are not labels in the remote inventories, but documents, so the doc role should be used. But changing to that role does not lower-case its argument, so the mixed-case inventory name now doesn't work, but changing them in the :doc: to lower case makes them work.So the changes are: in conf.py :
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'osvb': ('https://umarcor.github.io/osvb', None),
'pyvhdlmodel': ('https://vhdl.github.io/pyVHDLModel', None),
'pysystemverilogmodel': ('https://edaa-org.github.io/pySystemVerilogModel', None),
} and in * ``Glossary`` :doc:`Glossary`
* ``pyVHDLModel:Glossary`` :doc:`pyvhdlmodel:Glossary`
* ``pySystemVerilogModel:Glossary`` :doc:`pysystemverilogmodel:Glossary` But the very last reference, This is a bit of a mess with how the inventory specifications are specified. We are sort-of in a process of deprecating that syntax and adding a dedicated role for these cases #9062, which should sort most of this out. That is, don't mess with the case of the inventory name. |
@jakobandersen so to summarize:
|
Basically yes. |
@jakobandersen, thanks so much for looking into this! I updated the branch to better use And this is the result with lowercase identifiers: It seems that |
Any updates on this? |
There is now #9822, which implements the new role. I tried to use it to use it in your example and got to something like 3 | Language Model
Syntax/design Document Object Model (DOM) of the language(s).
* ``comparison manual <python:comparisons>`` :external:python+ref:`comparison manual <comparisons>`
* ``osvb:API:Core`` :external:osvb+ref:`API:Core`
* ``API:Core`` :ref:`API:Core`
* ``goals`` :ref:`goals`
* ``pyvhdlmodel:goals`` :external:pyvhdlmodel+ref:`goals`
* ``pyVHDLModel:goals`` :external:pyVHDLModel+ref:`goals`
* ``Title <pyVHDLModel:goals>`` :external:pyVHDLModel+ref:`Title <goals>`
* ``Glossary`` :ref:`Glossary`
* ``pyVHDLModel:glossary`` :external:pyVHDLModel+ref:`glossary`
* ``pySystemVerilogModel:Glossary`` :external:pySystemVerilogModel+ref:`Glossary`
* ``vhdlmodel`` :ref:`vhdlmodel`
* ``pyVHDLModel:vhdlmodel`` :external:pyVHDLModel+ref:`vhdlmodel`
* ``pySystemVerilogModel:vhdlmodel`` :external:pySystemVerilogModel+ref:`vhdlmodel` This works without lower-casing the |
Describe the bug
We are trying to cross-reference several sites built with Sphinx. We found that some references are properly resolved, but others fail. Precisely, if we reference labels in other sites without specifying the namespace/identifier, it does work. However, that is ambiguous, because multiple sites might have the same label. Unfortunately, when using the namespace/identifier, references are not resolved. To our surprise, that is not consistent. It works for some sites, but not for others.
I'm not sure about this being a bug or a misconfiguration of some of the sites.
How to Reproduce
As seen, refs to
python
orOSVB
namespaces/identifiers are resolved, but references to pyVHDLModel or pySystemVerilogModel do fail.Expected behavior
Refs to pyVHDLModel or pySystemVerilogModel Glossary labels should work as
python:comparisons
orOSVB:API:Core
.Your project
https://github.com/edaa-org/edaa-org.github.io
Screenshots
OS
Linux and MSYS2
Python version
3.9
Sphinx version
4.2
Sphinx extensions
https://github.com/edaa-org/edaa-org.github.io/blob/19f14102835c2fc1224363ee46296058c06a1753/conf.py#L168-L172
Extra tools
No response
Additional context
Same issue in VHDL/pyVHDLModel#32.
/cc @Paebbels
The text was updated successfully, but these errors were encountered: