[Git][ghc/ghc][wip/T23818] users-guide: Ensure extlinks is compatible with Sphinx <4

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Aug 10 14:39:56 UTC 2023



Ben Gamari pushed to branch wip/T23818 at Glasgow Haskell Compiler / GHC


Commits:
3a84cad9 by Ben Gamari at 2023-08-10T10:39:42-04:00
users-guide: Ensure extlinks is compatible with Sphinx <4

The semantics of the `extlinks` attribute annoyingly changed in Sphinx
4. Reflect this in our configuration. See #22690.

Fixes #23807.

- - - - -


1 changed file:

- docs/users_guide/ghc_config.py.in


Changes:

=====================================
docs/users_guide/ghc_config.py.in
=====================================
@@ -1,7 +1,17 @@
-extlinks = {
-    'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '%s'),
-    'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#%s'),
-}
+import sphinx
+from utils import parse_version
+
+if parse_version(sphinx.__version__) >= [4,0,0]:
+    # N.B. see #23807 and #22690
+    extlinks = {
+        'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '#%s'),
+        'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '%s'),
+    }
+else:
+    extlinks = {
+        'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '#'),
+        'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', ''),
+    }
 
 libs_base_uri = '../libraries'
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3a84cad9767389a591e427370ebfb54916f34060

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3a84cad9767389a591e427370ebfb54916f34060
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230810/763b9388/attachment-0001.html>


More information about the ghc-commits mailing list