From 2ebd1c8f158ea975f2e7757786ebb6009a3f3d92 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 20 Dec 2024 15:13:16 +0000 Subject: [PATCH] docs: Hide Unix and Win32 symbols from main GLib and GIO docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These symbols are documented in the {glib,gio}-{unix,win32} documentation builds, and shouldn’t be duplicated in the main documentation. It’s a historical (and unavoidable) accident that those symbols are in the main GIR files. If we don’t hide the symbols from the main docs build, we now run into the problem of the `GioUnix` namespace not being known to gi-docgen while building the `Gio` docs. This is because of the previous two commits, which ported more of the `gunixmounts` documentation to gi-docgen syntax. I don’t know of another way to fix this, other than to hide the `GioUnix` symbols from the `Gio` docs build. Signed-off-by: Philip Withnall Helps: #3250 --- docs/reference/gio/gio.toml.in | 35 ++++++++++++++++++++++++++++++++ docs/reference/glib/glib.toml.in | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/docs/reference/gio/gio.toml.in b/docs/reference/gio/gio.toml.in index f81439671..7010ecc22 100644 --- a/docs/reference/gio/gio.toml.in +++ b/docs/reference/gio/gio.toml.in @@ -73,3 +73,38 @@ content_images = [ "menu-model-dark.svg", "menu-model-light.svg", ] + +# We have to hide the GioUnix and GioWin32 symbols from the documentation — they +# have to be present in the GIR files (until we next break API), but their +# documentation is split out to gio-{unix,win32}.toml. +[[object]] +pattern = "Unix[A-Z].+" +hidden = true + +[[object]] +pattern = "unix_.+" +hidden = true + +[[struct]] +pattern = "Unix[A-Z].+" +hidden = true + +[[function]] +pattern = "unix_.+" +hidden = true + +[[object]] +pattern = "Win32[A-Z].+" +hidden = true + +[[object]] +pattern = "win32_.+" +hidden = true + +[[struct]] +pattern = "Win32[A-Z].+" +hidden = true + +[[function]] +pattern = "win32_.+" +hidden = true \ No newline at end of file diff --git a/docs/reference/glib/glib.toml.in b/docs/reference/glib/glib.toml.in index 478f47b9c..ecdf2e1ff 100644 --- a/docs/reference/glib/glib.toml.in +++ b/docs/reference/glib/glib.toml.in @@ -128,3 +128,38 @@ hidden = true [[object]] pattern = "macro__has_*" hidden = true + +# We have to hide the GioUnix and GioWin32 symbols from the documentation — they +# have to be present in the GIR files (until we next break API), but their +# documentation is split out to glib-{unix,win32}.toml. +[[object]] +pattern = "Unix[A-Z].+" +hidden = true + +[[object]] +pattern = "unix_.+" +hidden = true + +[[struct]] +pattern = "Unix[A-Z].+" +hidden = true + +[[function]] +pattern = "unix_.+" +hidden = true + +[[object]] +pattern = "Win32[A-Z].+" +hidden = true + +[[object]] +pattern = "win32_.+" +hidden = true + +[[struct]] +pattern = "Win32[A-Z].+" +hidden = true + +[[function]] +pattern = "win32_.+" +hidden = true \ No newline at end of file