Skip to content

fix: explain missing Brotli submodule during build - #1

Open
manuelsampedro1 wants to merge 1 commit into
BitgesellOfficial:masterfrom
manuelsampedro1:codex/brotlic-submodule-build-error
Open

fix: explain missing Brotli submodule during build#1
manuelsampedro1 wants to merge 1 commit into
BitgesellOfficial:masterfrom
manuelsampedro1:codex/brotlic-submodule-build-error

Conversation

@manuelsampedro1

Copy link
Copy Markdown

This improves the failure mode for git checkouts that have not initialized the bundled Brotli C submodule.

A clean checkout without submodules currently fails deep inside cc/clang:

clang: error: no such file or directory: 'brotli/c/common/constants.c'

Changes:

  • add an early build.rs check for the required Brotli C source
  • emit an actionable message telling contributors to run git submodule update --init --recursive
  • document the required submodule initialization in README Requirements

Validation:

  • git submodule update --init --recursive
  • cargo test

Bounty context: BitgesellOfficial/bitgesell#39

@MyTH-zyxeon

Copy link
Copy Markdown

Review assist for maintainers:

This looks like a focused build-diagnostics improvement for git-checkout users who have not initialized the bundled Brotli C submodule. I checked the patch scope: README adds the exact git submodule update --init --recursive step, and brotlic-sys/build.rs fails early when brotli/c/common/constants.c is missing before invoking the C compiler.

Suggested merge checks:

  • Build once from a checkout with the submodule initialized and confirm the existing cc::Build path is unchanged.
  • Build once from a checkout with the submodule intentionally absent and confirm the new panic is the first actionable error and includes the missing source path plus the submodule command.
  • Confirm packaged/crates.io builds are not affected if the release artifact includes the Brotli C sources and does not rely on git submodule state.

I do not see dependency, runtime compression, wallet/key, or live-node behavior changes in this patch as written; the main acceptance criterion is clearer failure mode coverage for source checkouts missing Brotli C sources.

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