Skip to content

Commit 7e1e52a

Browse files
authored
Merge pull request #12 from Yarwin/supply-published-docs-cfg
Include `published_docs` cfg while building the docs.
2 parents 373ac08 + b3c3662 commit 7e1e52a

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.github/workflows/build-website.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ permissions:
2525

2626
jobs:
2727
check-website:
28-
runs-on: ubuntu-latest
28+
runs-on: ubuntu-24.04
2929
if: github.event_name == 'pull_request'
3030
steps:
3131
- name: "Checkout"
@@ -40,7 +40,7 @@ jobs:
4040

4141

4242
deploy-website:
43-
runs-on: ubuntu-latest
43+
runs-on: ubuntu-24.04
4444
if: github.event_name != 'pull_request'
4545
steps:
4646
- name: "Workflow triggered by push to master"
@@ -133,7 +133,7 @@ jobs:
133133
license-guard:
134134
# not on repo dispatch
135135
if: github.event_name != 'repository_dispatch'
136-
runs-on: ubuntu-20.04
136+
runs-on: ubuntu-24.04
137137
steps:
138138
- uses: actions/checkout@v4
139139

.github/workflows/garbage-collect.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defaults:
1818

1919
jobs:
2020
remove-closed-prs:
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-24.04
2222
steps:
2323
- name: "Checkout"
2424
uses: actions/checkout@v4

.github/workflows/update-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defaults:
2727

2828
jobs:
2929
update-docs:
30-
runs-on: ubuntu-latest
30+
runs-on: ubuntu-24.04
3131
steps:
3232
# - name: "Info about workflow (${{ github.event.client_payload.op }} ${{ github.event.client_payload.repo }}/${{ github.event.client_payload.num }})"
3333
- name: "Info about workflow (${{ env.OP }} ${{ env.REPO }}/${{ env.NUM }})"

documentation/put.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ up=".."
9292

9393
# unused_doc_comments,unused_attribute: caused by false positives from doc(cfg(...)) attributes.
9494
export RUSTFLAGS="--cfg published_docs -A unused_imports -A dead_code -A unexpected_cfgs -A unused_doc_comments -A unused_attributes"
95-
# export RUSTDOCFLAGS=...
95+
# Both need to be supplied since `RUSTDOCFLAGS` is being propagated only to crate that is being documented (only "godot" crate in this case)
96+
# while we need cfg value `published_docs` for codegen and other crates as well.
97+
# All doc(cfg(...)) attributes are gated behind `published_docs` cfg – therefore it must be supplied as well.
98+
export RUSTDOCFLAGS=$RUSTFLAGS
9699

97100
# shellcheck disable=SC2086
98101
cargo +nightly doc -p $mainCrate $features --no-deps --target-dir $up/target

0 commit comments

Comments
 (0)