Avoid recursing into JSON types when building docs.

Review Request #13953 — Created June 5, 2024 and submitted

Information

Djblets
release-5.x

Reviewers

When building docs, Sphinx tries to recurse into types as far as it can
before bailing. Our JSON types can recurse infinitely, and this
generates some pretty pathological output with long read and write
times.

Fortunately, Sphinx has a way of turning a type reference to a
hard-coded string, which seems to be intended for cases of pathological
types. We now set this when building our docs, ensuring that we give a
meaningful type and don't attempt to recurse.

Successfully built our docs and verified that the djblets.util.typing
docs weren't showing giant recursive types.

Summary ID
Avoid recursing into JSON types when building docs.
When building docs, Sphinx tries to recurse into types as far as it can before bailing. Our JSON types can recurse infinitely, and this generates some pretty pathological output with long read and write times. Fortunately, Sphinx has a way of turning a type reference to a hard-coded string, which seems to be intended for cases of pathological types. We now set this when building our docs, ensuring that we give a meaningful type and don't attempt to recurse.
4a1e29784ccda39e002496309729c4f082b1766c
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.x (27e8c28)