Conversation
| build: | ||
| strategy: | ||
| matrix: | ||
| toolchain: [ stable, beta ] |
There was a problem hiding this comment.
What MSRV will the VSS client support? Can we start enforcing it here in CI from the getgo?
There was a problem hiding this comment.
I haven't gotten a chance to look into that, when i do, will start enforcing it.
There was a problem hiding this comment.
Great! Mind creating a tracking issue for it?
Well, it would avoid the additional |
dc423af to
0715f27
Compare
| build: | ||
| strategy: | ||
| matrix: | ||
| toolchain: [ stable, beta ] |
There was a problem hiding this comment.
Great! Mind creating a tracking issue for it?
.github/workflows/build.yml
Outdated
| - name: Checkout source code | ||
| uses: actions/checkout@v2 | ||
| - name: Install Protobuf compiler (protoc) | ||
| uses: arduino/setup-protoc@v1 |
There was a problem hiding this comment.
Any reason we can't just simply run sudo apt-get update && sudo apt-get -y install protobuf-compiler?
There was a problem hiding this comment.
i think that one is platform agnostic, but i think we could replace with simpler command above.
| profile: minimal | ||
| - name: Build on Rust ${{ matrix.toolchain }} | ||
| run: cargo build --verbose --color always | ||
| - name: Check formatting |
There was a problem hiding this comment.
Probably also want to add another step enforcing buildable docs for the public API, i.e.,
cargo check --release
cargo doc --release
In combination with adding
#![deny(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::private_intra_doc_links)]
To your lib.rs file.
There was a problem hiding this comment.
👍
For now adding only broken_intra_doc_links and private_intra_doc_links
Some of the auto-generated code doesn't comply with all the checks.
There was a problem hiding this comment.
Mh, but isn't that simply a function of the docs missing in https://github.com/lightningdevkit/vss-server/blob/main/app/src/main/proto/vss.proto? Should they be added there rather than omitting the check here?
There was a problem hiding this comment.
"for now",
will add it eventually. I can add at warn level for now.
(already have some changes in pipeline for proto file)
| profile: minimal | ||
| - name: Build on Rust ${{ matrix.toolchain }} | ||
| run: cargo build --verbose --color always | ||
| - name: Check formatting |
| // cargo build && OUT_DIR=../target/tmp/ cargo test generate_protos -- --exact | ||
| // ``` | ||
| #[test] | ||
| #[ignore] |
There was a problem hiding this comment.
Not quite sure why we have this test case here? Seems this should be part of (a) build script rather than live in the tests folder? Also we probably don't want to use ignore and have the user uncomment it, but rather use a cfg(..) for this. This also breaks a simple cargo test for me:
> cargo test
Compiling prost v0.11.9
Compiling regex-syntax v0.7.1
Compiling vss-accessor v0.1.0 (/Users/ero/workspace/vss-rust-client/vss-accessor)
Compiling reqwest v0.11.17
Compiling prost-types v0.11.9
Compiling regex v1.8.1
Compiling prost-build v0.11.9
error: environment variable `OUT_DIR` not defined
--> vss-accessor/tests/generate_protos.rs:22:19
|
22 | fs::copy(concat!(env!("OUT_DIR"), "/org.vss.rs"), "src/generated-src/org.vss.rs").unwrap();
| ^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `vss-accessor` due to previous error
warning: build failed, waiting for other jobs to finish...
exit 101
There was a problem hiding this comment.
i earlier had this in build.rs, on feedback had moved it to test which runs optionally.
but i think build.rs with conditional build is the right approach.
tnull
left a comment
There was a problem hiding this comment.
Generally LGTM!
Only one formatting nit and one question. Should be good to go after that though.
There was a problem hiding this comment.
Why are we checking in the generated sources if we're downloading and building them from a specific server commit? Just to have clear versioning of the proto file?
There was a problem hiding this comment.
yes and people felt more comfortable with static generated code over generated code for every build.
There was a problem hiding this comment.
i thought we discussed this already hence this PR was branched out and created.
No description provided.