Skip to content

Commit b7ff032

Browse files
authored
[Documentation] Replace recommonmark by myst-parser (llvm#65664)
Recommonmark has been deprecated, then archived last year. This was tracked by: llvm/llvm-iwg#30 See https://github.com/readthedocs/recommonmark This patch migrates all our doc to use myst Additional details for bot maintainers: https://discourse.llvm.org/t/maintenance-required-on-sphinx-build-bots/73612
1 parent 92a394e commit b7ff032

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+173
-225
lines changed

.github/workflows/release-tasks.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,19 @@ jobs:
2424
release_version=$(echo "${{ github.ref_name }}" | sed 's/llvmorg-//g')
2525
echo "release-version=$release_version" >> "$GITHUB_OUTPUT"
2626
27+
- name: Checkout LLVM
28+
uses: actions/checkout@v4
29+
2730
- name: Install Dependencies
2831
run: |
2932
sudo apt-get update
3033
sudo apt-get install -y \
3134
doxygen \
3235
graphviz \
3336
python3-github \
34-
python3-recommonmark \
35-
python3-sphinx \
3637
ninja-build \
3738
texlive-font-utils
38-
pip3 install --user sphinx-markdown-tables
39-
40-
- name: Checkout LLVM
41-
uses: actions/checkout@v4
39+
pip3 install --user -r ./llvm/docs/requirements.txt
4240
4341
- name: Create Release
4442
run: |

clang/docs/conf.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,11 @@
3232
# Add any paths that contain templates here, relative to this directory.
3333
templates_path = ["_templates"]
3434

35-
# The suffix of source filenames.
36-
source_suffix = {
37-
".rst": "restructuredtext",
38-
}
3935

40-
try:
41-
import recommonmark
42-
except ImportError:
43-
# manpages do not use any .md sources
44-
if not tags.has("builder-man"):
45-
raise
46-
else:
47-
import sphinx
48-
49-
if sphinx.version_info >= (3, 0):
50-
# This requires 0.5 or later.
51-
extensions.append("recommonmark")
52-
else:
53-
source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
54-
source_suffix[".md"] = "markdown"
36+
import sphinx
37+
38+
if sphinx.version_info >= (3, 0):
39+
extensions.append("myst_parser")
5540

5641
# The encoding of source files.
5742
# source_encoding = 'utf-8-sig'

flang/docs/Aliasing.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
# Aliasing in Fortran
1010

11-
```eval_rst
12-
.. contents::
13-
:local:
11+
```{contents}
12+
---
13+
local:
14+
---
1415
```
1516

1617
## Introduction

flang/docs/ArrayComposition.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
# Array Composition
1010

11-
```eval_rst
12-
.. contents::
13-
:local:
11+
```{contents}
12+
---
13+
local:
14+
---
1415
```
1516

1617
This note attempts to describe the motivation for and design of an

flang/docs/BijectiveInternalNameUniquing.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
# Bijective Internal Name Uniquing
1010

11-
```eval_rst
12-
.. contents::
13-
:local:
11+
```{contents}
12+
---
13+
local:
14+
---
1415
```
1516

1617
FIR has a flat namespace. No two objects may have the same name at the module

flang/docs/C++17.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
# C++14/17 features used in f18
1010

11-
```eval_rst
12-
.. contents::
13-
:local:
11+
```{contents}
12+
---
13+
local:
14+
---
1415
```
1516

1617
The C++ dialect used in this project constitutes a subset of the

flang/docs/C++style.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
# Flang C++ Style Guide
1010

11-
```eval_rst
12-
.. contents::
13-
:local:
11+
```{contents}
12+
---
13+
local:
14+
---
1415
```
1516

1617
This document captures the style guide rules that are followed in the Flang codebase.

flang/docs/Calls.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
# Representation of Fortran function calls
1010

11-
```eval_rst
12-
.. contents::
13-
:local:
11+
```{contents}
12+
---
13+
local:
14+
---
1415
```
1516

1617
## Procedure reference implementation protocol

flang/docs/Character.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
# Implementation of `CHARACTER` types in f18
1010

11-
```eval_rst
12-
.. contents::
13-
:local:
11+
```{contents}
12+
---
13+
local:
14+
---
1415
```
1516

1617
## Kinds and Character Sets

flang/docs/ComplexOperations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Complex Operations
22

3-
```eval_rst
4-
.. contents::
3+
```{eval-rst}
4+
.. toctree::
55
:local:
66
```
77

0 commit comments

Comments
 (0)