Page MenuHomePhabricator

[Chronik] Move compiled `proto` module from `chronik-http` into new crate `chronik-proto`
ClosedPublic

Authored by tobias_ruck on Mar 25 2023, 13:49.

Details

Summary

This allows any crate to use protobuf structs, not just chronik-http.

Test Plan

ninja check-crates && ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chronik-move-proto
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22699
Build 45018: Build Diffbuild-chronik
Build 45017: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 25 2023, 14:54

Move proto into its own crate

tobias_ruck retitled this revision from [Chronik] Move compiled `proto` module from `chronik-http` to `chronik-indexer` to [Chronik] Move compiled `proto` module from `chronik-http` into new crate `chronik-proto`.Mar 25 2023, 15:27
tobias_ruck edited the summary of this revision. (Show Details)

Tail of the build log:

test src/hash.rs - hash::Hashed::hex_le (line 138) ... ok
test src/hash.rs - hash::Hashed::to_le_bytes (line 108) ... ok
test src/hash.rs - hash::Hashed::to_be_vec (line 195) ... ok
test src/hash.rs - hash::Hashed::to_le_vec (line 178) ... ok
test src/hash.rs - hash::Hashed::to_be_bytes (line 120) ... ok
test src/tx/txid.rs - tx::txid::TxId::to_bytes (line 28) ... ok
test src/tx/txid.rs - tx::txid::TxId::as_bytes (line 43) ... ok
test src/tx/txid.rs - tx::txid::TxId::to_vec (line 58) ... ok

test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.66s

[6/6] cd /work && /usr/bin/cmake -E env CARGO_TARGET_DIR="/work/abc-ci-builds/build-chronik/cargo/build" CARGO_BUILD_RUSTC="/root/.rustup/toolchains/1.67.1-x86_64-unknown-linux-gnu/bin/rustc" CARGO_BUILD_RUSTDOC="/root/.rustup/toolchains/1.67.1-x86_64-unknown-linux-gnu/bin/rustdoc" /root/.rustup/toolchains/1.67.1-x86_64-unknown-linux-gnu/bin/cargo --locked test --package abc-rust-*
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on build directory
   Compiling memchr v2.5.0
   Compiling libc v0.2.139
   Compiling abc-rust-lint v0.1.0 (/work/chronik/abc-rust-lint)
   Compiling object v0.29.0
   Compiling backtrace v0.3.66
   Compiling stable-eyre v0.2.2
   Compiling abc-rust-error v0.1.0 (/work/chronik/abc-rust-error)
    Finished test [unoptimized + debuginfo] target(s) in 2m 17s
     Running unittests src/lib.rs (abc-ci-builds/build-chronik/cargo/build/debug/deps/abc_rust_error-eec6582b4b0e9875)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/test_error.rs (abc-ci-builds/build-chronik/cargo/build/debug/deps/test_error-ad65b1b6998d5ffe)

running 1 test
test test_error ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/lib.rs (abc-ci-builds/build-chronik/cargo/build/debug/deps/abc_rust_lint-7244a5015e74dfbb)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests abc-rust-error

running 1 test
test src/http_status.rs - http_status::parse_error_status (line 10) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.20s

   Doc-tests abc-rust-lint

running 1 test
test src/lib.rs - lint (line 13) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.11s

ninja: error: '../../chronik/proto/chronik.proto', needed by 'test/chronik_pb2.py', missing and no known rule to make it
Build build-chronik failed with exit code 1