docs(referencing.rst): add additional data about :doc: role#13587
docs(referencing.rst): add additional data about :doc: role#13587AA-Turner merged 3 commits intosphinx-doc:masterfrom
Conversation
| If no explicit link text is given (like usual: ``:doc:`Monty Python members | ||
| </people>```), the link caption will be the title of the given document. | ||
|
|
||
| Note that the string inside the single quotes must be a case-sensitive with |
There was a problem hiding this comment.
It’s more straightforward to integrate this in line 139 via
the document name is a case-sensitive relative or absolute path.
Or if you feel the need for more context
the document name can be a relative or absolute path and is always case-sensitive, even on windows.
There was a problem hiding this comment.
How practical would it be to remove case-sensitivity? This seems like surprising behaviour.
There was a problem hiding this comment.
Or if you feel the need for more context
Done! I like the 2nd version better, because then no Windows users have to wonder whether it applies to them or not.
There was a problem hiding this comment.
How practical would it be to remove case-sensitivity? This seems like surprising behaviour.
"Surprising" depends on your OS.
If we just make our internal handling case-insensitive, we'd can run into the following situation: Somebody uses sloppy casing because they are on windows and then somebody else tries to build on Linux and that fails because the file is not found.
I think we don't want that. So we'd have to add extra logic to care for OS that expect exact casing (such as, if don't find a file, search for files with other casing).
I believe being strict and requiring correct casing right away is the better approach.
There was a problem hiding this comment.
I believe being strict and requiring correct casing right away is the better approach.
Interestingly, I find this to be true. Here is why: Of the many, many people that build the LVGL documents which is the most important place I use Sphinx (I do a lot of maintenance of those docs as well as the doc-build system [we do some programmatic "prep work" before Sphinx is launched]), there are only 2 of us with Windows systems and the others all have Linux, and we share the same code and files and—this may seem odd, but it is, in fact a real need:
- it needs to FAIL on both platforms for the same reasons, and
- when it works, it needs to work on both platforms.
I NEVER want to crank out a document set with its build system that does not also work on Linux!
Given that need, this behavior of the :doc: role is, in fact, in alignment with that. As it is the only interpreted text role (that I am aware of) that deals with "things" in the file system, it makes sense from a design perspective to keep Sphinx as cross-platform-compatible as possible.
P.S. Thank you @AA-Turner for the maintenance work you did with breathe!! That has helped everyone on the LVGL doc team! :-)
Purpose
I just this morning discovered (by investigating a
WARNING: unknown document: '<name>' [ref.doc]message) that the:doc:needs to perform a case-sensitive filename match, even on Windows! That is good to know, and if it had been mentioned in the documentation, would not have cost me the time it cost to resolve. So I want to leave a helpful trail behind me that will help others who need to know this.References
n/a