Skip to content

Conversation

@tcharding
Copy link
Member

Currently the corpec repository excludes the node crate because it has unusual feature requirements - it requires at least one version feature.

Add support for testing node. The logic in build_and_test is general and uses a new var defined in contrib/test_vars.sh but does not require this var to exist.

The logic in do_lint is ugly and specific to node. I couldn't think of a cleaner way to do it.

Currently the `corpec` repository excludes the `node` crate because it
has unusual feature requirements - it requires at least one version
feature.

Add support for testing `node`. The logic in `build_and_test` is general
and uses a new var defined in `contrib/test_vars.sh` but does not
require this var to exist.

The logic in `do_lint` is ugly and specific to `node`. I couldn't think
of a cleaner way to do it.
@tcharding tcharding force-pushed the 02-12-support-corepc branch from 704b5dc to d6bcfac Compare February 11, 2025 18:04
tcharding added a commit to tcharding/corepc that referenced this pull request Feb 11, 2025
Currently we do not include the `node` crate in the workspace because
`run_task` did not support testing it.

However `run_task` is patched in

 rust-bitcoin/rust-bitcoin-maintainer-tools#19

So we can use it now.

Include `node` in the workspace. Configure it to work with the newly
patched `run_task`. Add a `extra_tests.sh` script that runs the `node`
tests.
tcharding added a commit to tcharding/corepc that referenced this pull request Feb 11, 2025
Currently we do not include the `node` crate in the workspace because
`run_task` did not support testing it.

However `run_task` is patched in

 rust-bitcoin/rust-bitcoin-maintainer-tools#19

So we can use it now.

Include `node` in the workspace. Configure it to work with the newly
patched `run_task`. Add a `extra_tests.sh` script that runs the `node`
tests.
tcharding added a commit to tcharding/corepc that referenced this pull request Feb 12, 2025
Currently we do not include the `node` crate in the workspace because
`run_task` did not support testing it.

However `run_task` is patched in

 rust-bitcoin/rust-bitcoin-maintainer-tools#19

So we can use it now.

Include `node` in the workspace. Configure it to work with the newly
patched `run_task`. Add a `extra_tests.sh` script that runs the `node`
tests.
tcharding added a commit to tcharding/corepc that referenced this pull request Feb 12, 2025
Currently we do not include the `node` crate in the workspace because
`run_task` did not support testing it.

However `run_task` is patched in

 rust-bitcoin/rust-bitcoin-maintainer-tools#19

So we can use it now.

Include `node` in the workspace. Configure it to work with the newly
patched `run_task`. Add a `extra_tests.sh` script that runs the `node`
tests.

In order to get MSRV building we make all deps use `default-features =
false` then explicitly enable just what we need.
tcharding added a commit to tcharding/corepc that referenced this pull request Feb 12, 2025
Currently we do not include the `node` crate in the workspace because
`run_task` did not support testing it.

However `run_task` is patched in

 rust-bitcoin/rust-bitcoin-maintainer-tools#19

So we can use it now.

Include `node` in the workspace. Configure it to work with the newly
patched `run_task`. Add a `extra_tests.sh` script that runs the `node`
tests.

In order to get MSRV building we make all deps use `default-features =
false` then explicitly enable just what we need.
@apoelstra
Copy link
Member

In d6bcfac:

This seems reasonable to me. I think that we could make this a bit simpler and more general though -- rather than having a whitelist of exact features that we need to keep up to date, we could have a blacklist of feature combos that aren't allowed. (Or even just a flag to blacklist "no features at all", which is really all we need.)

I think we can use the same blacklist in the clippy thing -- so rather than special-casing corepc we special-case "crates that can't be built with the empty feature set".

But what you've done here is ok with me. This repo is inherently going to be crufty and need some special-cases, and isn't necessarily supposed to be easily usable outside the rust-bitcoin ecosystem.

@tcharding
Copy link
Member Author

Cool. Lets merge as is and I can improve it at another time if/when I get motivation.

@apoelstra
Copy link
Member

ACK d6bcfac

@apoelstra apoelstra merged commit f59bcc8 into rust-bitcoin:master Feb 14, 2025
1 check passed
@tcharding tcharding deleted the 02-12-support-corepc branch February 17, 2025 22:21
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