Skip to content
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

Break ReleaseNotes.rst #28

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/templates/validate-sphinx-docs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: validate-sphinx-docs

inputs:
path:
required: true

runs:
using: "composite"
steps:
- name: Validate Sphinx documentation in ${{ inputs.path }}
uses: cor3ntin/sphinx-action@main
with:
docs-folder: ${{ inputs.path }}
# We exclude references errors so that we do not have to build the table gen documentation
build-command: "sphinx-build -b html . _build -Dsuppress_warnings=toc.not_readable,ref.*"
74 changes: 74 additions & 0 deletions .github/workflows/documentation-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Checking Documentation

on:
pull_request:
path: '**/docs/**/*.rst'

jobs:
verify-sphinx-documentation:
runs-on: ubuntu-latest
env:
SPHINX_ACTION: "./.github/templates/validate-sphinx-docs"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check Bolt documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./bolt/docs

- name: Check Clang documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./clang/docs

- name: Check Clang Tools documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./clang-tools-extra/docs

- name: Check Flang documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./flang/docs

- name: Check libc documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./libc/docs

- name: Check libcxx documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./libcxx/docs

- name: Check libunwind documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./libunwind/docs

- name: Check lldb documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./lldb/docs

- name: Check lld documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./lld/docs

- name: Check llvm documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./llvm/docs

- name: Check openmp documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./openmp/docs

- name: Check polly documentation
uses: "./.github/templates/validate-sphinx-docs"
with:
path: ./polly/docs
2 changes: 1 addition & 1 deletion .github/workflows/release-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
doxygen \
graphviz \
python3-github \
python3-recommonmark \
python3-myst-parser \
python3-sphinx \
ninja-build \
texlive-font-utils
Expand Down
12 changes: 6 additions & 6 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
`the Releases Page <https://llvm.org/releases/>`_.

Introduction
============
=========

Check warning on line 19 in clang/docs/ReleaseNotes.rst

View workflow job for this annotation

GitHub Actions / verify-sphinx-documentation

Title underline too short.

This document contains the release notes for the Clang C/C++/Objective-C
frontend, part of the LLVM Compiler Infrastructure, release |release|. Here we
describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
documentation <https://llvm.org/docs/ReleaseNotes.html>`_. For the libc++ release notes,
see `this page <https://libcxx.llvm.org/ReleaseNotes.html>`_. All LLVM releases
may be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_.
see `this page https://libcxx.llvm.org/ReleaseNotes.html>`_. All LLVM releases
may be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`.

For more information about Clang or LLVM, including information about the
latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
`LLVM Web Site <https://llvm.org>`_.
`LLVM Web Site <https://llvm.org`_.

Potentially Breaking Changes
============================
=========================

Check warning on line 35 in clang/docs/ReleaseNotes.rst

View workflow job for this annotation

GitHub Actions / verify-sphinx-documentation

Title underline too short.

Check warning on line 35 in clang/docs/ReleaseNotes.rst

View workflow job for this annotation

GitHub Actions / verify-sphinx-documentation

Title underline too short.
These changes are ones which we think may surprise users when upgrading to
Clang |release| because of the opportunity they pose for disruption to existing
code bases.
Expand All @@ -45,7 +45,7 @@
-----------------------------------------

ABI Changes in This Version
---------------------------
------------------------

Check warning on line 48 in clang/docs/ReleaseNotes.rst

View workflow job for this annotation

GitHub Actions / verify-sphinx-documentation

Title underline too short.

Check warning on line 48 in clang/docs/ReleaseNotes.rst

View workflow job for this annotation

GitHub Actions / verify-sphinx-documentation

Title underline too short.
- Following the SystemV ABI for x86-64, ``__int128`` arguments will no longer
be split between a register and a stack slot.

Expand Down
23 changes: 4 additions & 19 deletions clang/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,11 @@
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = {
".rst": "restructuredtext",
}

try:
import recommonmark
except ImportError:
# manpages do not use any .md sources
if not tags.has("builder-man"):
raise
else:
import sphinx

if sphinx.version_info >= (3, 0):
# This requires 0.5 or later.
extensions.append("recommonmark")
else:
source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
source_suffix[".md"] = "markdown"
import sphinx

if sphinx.version_info >= (3, 0):
extensions.append("myst_parser")

# The encoding of source files.
# source_encoding = 'utf-8-sig'
Expand Down
56 changes: 4 additions & 52 deletions flang/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,14 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
from datetime import date
from recommonmark.parser import CommonMarkParser

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))

# -- General configuration -----------------------------------------------------

# https://github.com/readthedocs/recommonmark/issues/177
# Method used to remove the warning message.
class CustomCommonMarkParser(CommonMarkParser):
def visit_document(self, node):
pass


# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
Expand All @@ -36,49 +26,11 @@ def visit_document(self, node):
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = {
".rst": "restructuredtext",
}
try:
import recommonmark
except ImportError:
# manpages do not use any .md sources
if not tags.has("builder-man"):
raise
else:
import sphinx

if sphinx.version_info >= (3, 0):
# This requires 0.5 or later.
extensions.append("recommonmark")
else:
source_parsers = {".md": CustomCommonMarkParser}
source_suffix[".md"] = "markdown"
extensions.append("sphinx_markdown_tables")

# Setup AutoStructify for inline .rst toctrees in index.md
from recommonmark.transform import AutoStructify

# Stolen from https://github.com/readthedocs/recommonmark/issues/93
# Monkey patch to fix recommonmark 0.4 doc reference issues.
from recommonmark.states import DummyStateMachine

orig_run_role = DummyStateMachine.run_role

def run_role(self, name, options=None, content=None):
if name == "doc":
name = "any"
return orig_run_role(self, name, options, content)

DummyStateMachine.run_role = run_role

def setup(app):
# Disable inline math to avoid
# https://github.com/readthedocs/recommonmark/issues/120 in Extensions.md
app.add_config_value("recommonmark_config", {"enable_inline_math": False}, True)
app.add_transform(AutoStructify)
import sphinx

if sphinx.version_info >= (3, 0):
extensions.append("myst_parser")
extensions.append("sphinx_markdown_tables")

# The encoding of source files.
# source_encoding = 'utf-8-sig'
Expand Down
6 changes: 4 additions & 2 deletions lldb/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
sys.path.insert(0, os.path.abspath("."))
# Add the build directory that contains the `lldb` module. LLDB_SWIG_MODULE is
# set by CMake.
sys.path.insert(0, os.getenv("LLDB_SWIG_MODULE"))
SWIG_MODULE = os.getenv("LLDB_SWIG_MODULE")
if SWIG_MODULE:
sys.path.insert(0, SWIG_MODULE)

# Put the generated Python API documentation in the 'python_api' folder. This
# also defines the URL these files will have in the generated website.
Expand Down Expand Up @@ -176,7 +178,7 @@

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = "%b %d, %Y"
# html_last_updated_fmt = "%b %d, %Y"

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
Expand Down
4 changes: 2 additions & 2 deletions llvm/docs/MarkdownQuickstartTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ without any syntax highlighting like this:

If you need to do fancier things than what has been shown in this document,
you can mail the list or check the [Common Mark spec]. Sphinx specific
integration documentation can be found in the [recommonmark docs].
integration documentation can be found in the [myst-parser docs].

[Common Mark spec]: http://spec.commonmark.org/0.28/
[recommonmark docs]: http://recommonmark.readthedocs.io/en/latest/index.html
[myst-parser docs]: https://myst-parser.readthedocs.io/en/latest/

## Generating the documentation

Expand Down
8 changes: 4 additions & 4 deletions llvm/docs/SphinxQuickstartTemplate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,19 @@ You can generate the HTML documentation from the sources locally if you want to
see what they would look like. In addition to the normal
`build tools <docs/GettingStarted.html>`_
you need to install `Sphinx`_ and the
`recommonmark <https://recommonmark.readthedocs.io/en/latest/>`_ extension.
`myst-parser <https://myst-parser.readthedocs.io/en/latest/>`_ extension.

On Debian you can install these with:

.. code-block:: console
sudo apt install -y sphinx-doc python-recommonmark-doc
sudo apt install -y sphinx-doc python3-myst-parser
On Ubuntu use pip to get an up-to-date version of recommonmark:
On Ubuntu use pip to get an up-to-date version of python3-myst-parser:

.. code-block:: console
sudo pip install sphinx recommonmark
sudo pip install sphinx myst-parser
Then run cmake to build the documentation inside the ``llvm-project`` checkout:

Expand Down
20 changes: 5 additions & 15 deletions llvm/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,11 @@
".rst": "restructuredtext",
}

try:
import recommonmark
except ImportError:
# manpages do not use any .md sources
if not tags.has("builder-man"):
raise
else:
import sphinx

if sphinx.version_info >= (3, 0):
# This requires 0.5 or later.
extensions.append("recommonmark")
else:
source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
source_suffix[".md"] = "markdown"
import sphinx

if sphinx.version_info >= (3, 0):
extensions.append("myst_parser")
extensions.append("sphinx_markdown_tables")

# The encoding of source files.
# source_encoding = 'utf-8-sig'
Expand Down
2 changes: 1 addition & 1 deletion llvm/utils/release/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# ninja-build gcc-c++
# * pip install sphinx-markdown-tables
# * Ubuntu:
# * apt-get install doxygen sphinx-common python3-recommonmark \
# * apt-get install doxygen sphinx-common python3-myst-parser \
# ninja-build graphviz texlive-font-utils
# * pip install sphinx-markdown-tables
#===------------------------------------------------------------------------===#
Expand Down
Loading