feat: add justfile#1979
Conversation
|
Did some thinking on this. Should we really exclude examples from formatting? |
|
You mean exclude examples from |
|
Yes, |
e6d410c to
40bcdce
Compare
|
If there are no objections I'll make these changes on |
|
The example crates really should be excluded since they're not part of the core library. I'm still in favor of making |
40bcdce to
35521b1
Compare
|
Makes sense. I reverted the changes to exclude the |
35521b1 to
eb3bc15
Compare
|
Friendly ping @notmandatory @ValuedMammal |
|
@luisschwab Thanks for the reminder. About the example crates, my comment was more about the overall structure of the repo, not to say they have to be excluded from the justfile entirely. The argument for having a separate command for the examples though is that |
| test: | ||
| cargo test --workspace --exclude 'examples' --all-features |
There was a problem hiding this comment.
📌 I think it would be a good idea to test each package individually. I was also going to suggest reducing --test-threads for tests that rely heavily on the testenv, but I just tested this on my own machine with no issues.
There was a problem hiding this comment.
We could do something like this:
test:
@just test-chain
@just test-core
@just test-file_store
@just test-electrum
@just test-esplora
@just test-bitcoind_rpc
test-chain:
cargo test -p bdk_chain --all-features
test-core:
cargo test -p bdk_core --all-features
test-file_store:
cargo test -p bdk_file_core --all-features
test-electrum:
cargo test -p bdk_electrum --all-features
test-esplora:
cargo test -p bdk_esplora --all-features
test-bitcoind_rpc:
cargo test -p bdk_bitcoind_rpc --all-featuresI could also add the underscore so those recipes don't show up when running just.
There was a problem hiding this comment.
I was also going to suggest reducing --test-threads for tests that rely heavily on the testenv, but I just tested this on my own machine with no issues.
I don't think that's necessary, running this on a low-end laptop doesn't take too long.
|
If it makes things less complicated, then I also agree with @notmandatory that we don't have to be very strict about excluding the examples. |
eb3bc15 to
e8fafb1
Compare
ValuedMammal
left a comment
There was a problem hiding this comment.
This looks great. Valid to note that the justfile can be used for basic sanity checking but at the moment doesn't help with switching toolchains, pinning dependencies, or checking various feature configurations, but these can be added as needed.
What would this look like? We can add it now. I'll also circle back to |
Description
Closes #1967.
This PR adds a
justfile, updates the PR template to use it, and adds a section on theREADME.mdto show available recipes.These are the implemented recipes:
checkwill verify ifHEADwas signed and echo that warning if not. It does not check all commits, but I think that checking only the last is a pretty good heuristic (who signs the last commit only?).Before pushing, one only needs to run
just p.Checklists
All Submissions:
just pbefore pushing