Skip to content

Makefile: build the Rust plugins after msggen regenerates cln-rpc - #50

Merged
kwsantiago merged 2 commits into
blake2b-unifiedfrom
makefile-rust-deps
Oct 18, 2026
Merged

kwsantiago merged 2 commits into
blake2b-unifiedfrom
makefile-rust-deps

Conversation

@kwsantiago

Copy link
Copy Markdown

CI builds intermittently fail with error: this file contains an unclosed delimiter --> cln-rpc/src/hooks.rs. The rules for the Rust plugins don't depend on the cln-rpc sources that msggen generates, so a parallel build can start cargo, which compiles cln-rpc, while msggen is still writing hooks.rs.

  • Backports the upstream Makefile change that adds the cln-rpc and cln-plugin sources to the prerequisites of each Rust plugin and example.
  • Adds ${CLN_RPC_SOURCES} to cln-plugin-reentrant, which that change leaves out. Its build compiles cln-plugin's dev-dependency cln-grpc, and with it cln-rpc.

To reproduce, msggen was made to leave hooks.rs half written for 20 seconds and cargo to start 8 seconds late, then cln-rpc/src/hooks.rs and one Rust target were built with make -j8. On the base, cln-currencyrate fails with the CI error. With the backport alone, cln-currencyrate builds and cln-plugin-reentrant fails the same way. With both commits, both build, and make starts cargo only after msggen finishes.

Changelog-None

@kwsantiago
kwsantiago merged commit ef3d3d3 into blake2b-unified Oct 18, 2026
46 checks passed
@kwsantiago
kwsantiago deleted the makefile-rust-deps branch October 18, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants