ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.81k stars 889 forks source link

configure: ensure that we have jq, fail if it fails #7662

Closed rustyrussell closed 3 days ago

rustyrussell commented 1 week ago

Added as a requirement, but it's better to check than crash at runtime.

I also ensured that the build fails if JQ fails.

Fixes: https://github.com/ElementsProject/lightning/issues/7657

ShahanaFarooqui commented 1 week ago

Good to have this check anyway, but looks like that it does not solve the problem? #7657 (comment)

Their file contents are incorrect, as detailed here: https://github.com/ElementsProject/lightning/issues/7657#issuecomment-2349892853.

You can reproduce the corrupted file by uninstalling jq and running make plugins/sql-schema_gen.h. Reinstalling jq restores the correct data.

vincenzopalazzo commented 5 days ago

You can reproduce the corrupted file by uninstalling jq and running make plugins/sql-schema_gen.h. Reinstalling jq restores the correct data.

Anyway this PR is not checking for the jq version, IMHO this is not a fix for the bug, probably we want to check also the version?

vincenzopalazzo commented 4 days ago
make[1]: Leaving directory '/home/runner/work/lightning/lightning/external/lowdown'
msggen cln-rpc/src/notifications.rs
error: failed to run custom build command for `cln-grpc v0.1.9 (/home/runner/work/lightning/lightning/cln-grpc)`

Caused by:
  process didn't exit successfully: `/home/runner/work/lightning/lightning/target/release/build/cln-grpc-8ca867bfe16fd099/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=proto/node.proto
  cargo:rerun-if-changed=proto

  --- stderr
  thread 'main' panicked at cln-grpc/build.rs:7:10:
  called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: node.proto:1228:1: Reached end of input in message definition (missing '}').\n" }

This is strange, is not a rust error but looks like this is a new error: protoc failed: node.proto:1228:1: Reached end of input in message definition (missing '}