Skip to content

Commit 5e24272

Browse files
authored
Merge pull request #4159 from TheBlueMatt/2025-10-0.2-beta
[0.2] Backport #4158 and bump versions to -beta1
2 parents 5b3692a + de3ddfa commit 5e24272

File tree

26 files changed

+120
-75
lines changed

26 files changed

+120
-75
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,24 @@ jobs:
233233
RUSTFLAGS: '--cfg=taproot'
234234
RUSTDOCFLAGS: '--cfg=taproot'
235235

236+
check_docs:
237+
runs-on: self-hosted
238+
env:
239+
# While docs.rs builds using a nightly compiler (and we use some nightly features),
240+
# nightly ends up randomly breaking builds occasionally, so we instead use beta
241+
# and set RUSTC_BOOTSTRAP in check-docsrs.sh
242+
TOOLCHAIN: beta
243+
steps:
244+
- name: Checkout source code
245+
uses: actions/checkout@v4
246+
with:
247+
fetch-depth: 0
248+
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
249+
run: |
250+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
251+
- name: Simulate docs.rs build
252+
run: ci/check-docsrs.sh
253+
236254
fuzz:
237255
runs-on: self-hosted
238256
env:

ci/check-docsrs.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
#shellcheck disable=SC2002,SC2086,SC2207
3+
4+
set -ex
5+
6+
# Attempt to simulate the docsrs builds. Sadly its not entirely trivial as
7+
# docs.rs reads metadata out of Cargo.toml which we don't want to have a whole
8+
# parser for.
9+
10+
WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' '\n') )
11+
echo "${WORKSPACE_MEMBERS[@]}"
12+
for CRATE in "${WORKSPACE_MEMBERS[@]}"; do
13+
pushd "$CRATE"
14+
CARGO_ARGS=""
15+
RUSTDOC_ARGS=""
16+
cat Cargo.toml | grep -A 100 '\[package.metadata.docs.rs\]' | tail -n +2 > /tmp/ldk-docsrs-rustdoc-config.txt
17+
while read -r LINE; do
18+
case "$LINE" in
19+
"["*) break;;
20+
"features"*)
21+
OG_IFS="$IFS"
22+
IFS=','
23+
for FEATURE in $(echo "$LINE" | sed 's/features.*=.*\[//g' | tr -d '"] '); do
24+
export CARGO_ARGS="$CARGO_ARGS --features $FEATURE"
25+
done
26+
IFS="$OG_IFS"
27+
;;
28+
"all-features = true")
29+
export CARGO_ARGS="$CARGO_ARGS --all-features"
30+
;;
31+
"rustdoc-args"*)
32+
RUSTDOC_ARGS="$(echo "$LINE" | sed 's/rustdoc-args.*=.*\[//g' | tr -d '"],')"
33+
;;
34+
esac
35+
done < /tmp/ldk-docsrs-rustdoc-config.txt
36+
rm /tmp/ldk-docsrs-rustdoc-config.txt
37+
echo "Building $CRATE with args $CARGO_ARGS and flags $RUSTDOC_ARGS"
38+
# We rely on nightly features but want to use a stable release in CI to avoid
39+
# spurous breakage, thus we set RUSTC_BOOTSTRAP=1 here.
40+
RUSTC_BOOTSTRAP=1 cargo rustdoc $CARGO_ARGS -- $RUSTDOC_ARGS
41+
popd
42+
done

ci/ci-tests.sh

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
#shellcheck disable=SC2002,SC2207
23
set -eox pipefail
34

45
RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
@@ -41,23 +42,7 @@ export RUST_BACKTRACE=1
4142
echo -e "\n\nChecking the workspace, except lightning-transaction-sync."
4243
cargo check --verbose --color always
4344

44-
# When the workspace members change, make sure to update the list here as well
45-
# as in `Cargo.toml`.
46-
WORKSPACE_MEMBERS=(
47-
lightning
48-
lightning-types
49-
lightning-block-sync
50-
lightning-invoice
51-
lightning-net-tokio
52-
lightning-persister
53-
lightning-background-processor
54-
lightning-rapid-gossip-sync
55-
lightning-custom-message
56-
lightning-macros
57-
lightning-dns-resolver
58-
lightning-liquidity
59-
possiblyrandom
60-
)
45+
WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' ' ') )
6146

6247
echo -e "\n\nTesting the workspace, except lightning-transaction-sync."
6348
cargo test --verbose --color always

lightning-background-processor/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning-background-processor"
3-
version = "0.2.0+git"
3+
version = "0.2.0-beta1"
44
authors = ["Valentine Wallace <vwallace@protonmail.com>"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning"
@@ -22,17 +22,17 @@ std = ["lightning/std", "lightning-liquidity/std", "bitcoin-io/std", "bitcoin_ha
2222
bitcoin = { version = "0.32.2", default-features = false }
2323
bitcoin_hashes = { version = "0.14.0", default-features = false }
2424
bitcoin-io = { version = "0.1.2", default-features = false }
25-
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
26-
lightning-rapid-gossip-sync = { version = "0.2.0", path = "../lightning-rapid-gossip-sync", default-features = false }
27-
lightning-liquidity = { version = "0.2.0", path = "../lightning-liquidity", default-features = false }
25+
lightning = { version = "0.2.0-beta1", path = "../lightning", default-features = false }
26+
lightning-rapid-gossip-sync = { version = "0.2.0-beta1", path = "../lightning-rapid-gossip-sync", default-features = false }
27+
lightning-liquidity = { version = "0.2.0-beta1", path = "../lightning-liquidity", default-features = false }
2828
possiblyrandom = { version = "0.2", path = "../possiblyrandom", default-features = false }
2929

3030
[dev-dependencies]
3131
tokio = { version = "1.35", features = [ "macros", "rt", "rt-multi-thread", "sync", "time" ] }
32-
lightning = { version = "0.2.0", path = "../lightning", features = ["_test_utils"] }
33-
lightning-invoice = { version = "0.34.0", path = "../lightning-invoice" }
34-
lightning-liquidity = { version = "0.2.0", path = "../lightning-liquidity", default-features = false, features = ["_test_utils"] }
35-
lightning-persister = { version = "0.2.0", path = "../lightning-persister" }
32+
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["_test_utils"] }
33+
lightning-invoice = { version = "0.34.0-beta1", path = "../lightning-invoice" }
34+
lightning-liquidity = { version = "0.2.0-beta1", path = "../lightning-liquidity", default-features = false, features = ["_test_utils"] }
35+
lightning-persister = { version = "0.2.0-beta1", path = "../lightning-persister" }
3636

3737
[lints]
3838
workspace = true

lightning-background-processor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![deny(rustdoc::broken_intra_doc_links)]
1414
#![deny(rustdoc::private_intra_doc_links)]
1515
#![deny(missing_docs)]
16-
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
16+
#![cfg_attr(docsrs, feature(doc_cfg))]
1717
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
1818

1919
#[cfg(any(test, feature = "std"))]

lightning-block-sync/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning-block-sync"
3-
version = "0.2.0+git"
3+
version = "0.2.0-beta1"
44
authors = ["Jeffrey Czyz", "Matt Corallo"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning"
@@ -19,13 +19,13 @@ rpc-client = [ "serde_json", "chunked_transfer" ]
1919

2020
[dependencies]
2121
bitcoin = "0.32.2"
22-
lightning = { version = "0.2.0", path = "../lightning" }
22+
lightning = { version = "0.2.0-beta1", path = "../lightning" }
2323
tokio = { version = "1.35", features = [ "io-util", "net", "time", "rt" ], optional = true }
2424
serde_json = { version = "1.0", optional = true }
2525
chunked_transfer = { version = "1.4", optional = true }
2626

2727
[dev-dependencies]
28-
lightning = { version = "0.2.0", path = "../lightning", features = ["_test_utils"] }
28+
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["_test_utils"] }
2929
tokio = { version = "1.35", features = [ "macros", "rt" ] }
3030

3131
[lints]

lightning-block-sync/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#![deny(rustdoc::private_intra_doc_links)]
1818
#![deny(missing_docs)]
1919
#![deny(unsafe_code)]
20-
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
20+
#![cfg_attr(docsrs, feature(doc_cfg))]
2121

2222
#[cfg(any(feature = "rest-client", feature = "rpc-client"))]
2323
pub mod http;

lightning-custom-message/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning-custom-message"
3-
version = "0.2.0+git"
3+
version = "0.2.0-beta1"
44
authors = ["Jeffrey Czyz"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning"
@@ -15,7 +15,7 @@ rustdoc-args = ["--cfg", "docsrs"]
1515

1616
[dependencies]
1717
bitcoin = "0.32.2"
18-
lightning = { version = "0.2.0", path = "../lightning" }
18+
lightning = { version = "0.2.0-beta1", path = "../lightning" }
1919

2020
[lints]
2121
workspace = true

lightning-dns-resolver/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[package]
22
name = "lightning-dns-resolver"
3-
version = "0.3.0+git"
3+
version = "0.3.0-beta1"
44
authors = ["Matt Corallo"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning/"
77
description = "A crate which implements DNSSEC resolution for lightning clients over bLIP 32 using `tokio` and the `dnssec-prover` crate."
88
edition = "2021"
99

1010
[dependencies]
11-
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
12-
lightning-types = { version = "0.3.0", path = "../lightning-types", default-features = false }
11+
lightning = { version = "0.2.0-beta1", path = "../lightning", default-features = false }
12+
lightning-types = { version = "0.3.0-beta1", path = "../lightning-types", default-features = false }
1313
dnssec-prover = { version = "0.6", default-features = false, features = [ "std", "tokio" ] }
1414
tokio = { version = "1.0", default-features = false, features = ["rt"] }
1515

1616
[dev-dependencies]
1717
bitcoin = { version = "0.32" }
1818
tokio = { version = "1.0", default-features = false, features = ["macros", "time"] }
19-
lightning = { version = "0.2.0", path = "../lightning", features = ["dnssec", "_test_utils"] }
19+
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["dnssec", "_test_utils"] }

lightning-invoice/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "lightning-invoice"
33
description = "Data structures to parse and serialize BOLT11 lightning invoices"
4-
version = "0.34.0+git"
4+
version = "0.34.0-beta1"
55
authors = ["Sebastian Geisler <sgeisler@wh2.tu-dresden.de>"]
66
documentation = "https://docs.rs/lightning-invoice/"
77
license = "MIT OR Apache-2.0"
@@ -19,7 +19,7 @@ std = []
1919

2020
[dependencies]
2121
bech32 = { version = "0.11.0", default-features = false }
22-
lightning-types = { version = "0.3.0", path = "../lightning-types", default-features = false }
22+
lightning-types = { version = "0.3.0-beta1", path = "../lightning-types", default-features = false }
2323
serde = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
2424
bitcoin = { version = "0.32.2", default-features = false, features = ["secp-recovery"] }
2525

0 commit comments

Comments
 (0)