-
Notifications
You must be signed in to change notification settings - Fork 155
9.x: fix CI #837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 9.x-branch
Are you sure you want to change the base?
9.x: fix CI #837
Conversation
Aside from not being future-proof at all, it's actually extremely hard to pin dependencies for this version of the library to get ones that work with 9.x. We have an ancient version of `bitcoind` in our deps, which in turn unconditionally depends on several crates which all have bad behavior (at least, the versions that we depend on). For example, both `zip` many versions and `bitcoind` itself have maximum `flate2` versions which are incompatible with each other. The latest version of `zip` 0.5.x removes the max version, but has an incorrectly stated minimum version of `thiserror`, which manifests in compilation errors because some trait impls aren't created by the `thiserror` macro. (And of course, you can't just use the latest `thiserror` because that does not compile with 1.41.1 for many reasons.) This is just one example. There are probably 10 such cases. Anyway now we have a lockfile and we can just forget about all this crap forever. As a secondary change: change all the `deny`s in lib.rs, except the one about unsafe code which seems likely to be future-proof, to `warn`s. The library doesn't compile on nightly otherwise, since e.g. the definition of `dead_code` has expanded. On my system I can now compile the library with both 1.41.1 and nightly 2025-06-23, with the same lockfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK bda1371
Sigh, after all the work I did to get a lockfile for the previous commit, it turns out that all the bitcoind tests were disabled anyway, with the explanation "breaking change in bitcoind". This commit deletes them entirely. We have no plans to fix them. If we ever want to regression test miniscript 9.x, we should do it externally by adding a fuzztest in master which pulls it in and tries to parse stuff. Then it will be actively exercised and maintained and not require ancient broken dependencies. This commit is all red EXCEPT a change to a test in src/miniscript/mod.rs. What's happening here is that we had one test (asserting on the string representation of errors from rust-bitcoin) which fails when the std feature is off. As it turns out, `bitcoind` unconditionally turns on that feature. So by having `bitcoind` as a dev-dependency it was impossible for us to ever test the nostd feature properly. Sigh.
Only change was to update the nightly version since the one I chose was affected by rust-lang/rust-clippy#6776. Gonna go ahead and merge this if CI (and my local CI) passes. |
As in other PRs, the meaningful changes here are: 'A'..'Z' becoming 'A'..='Z', and the partial_cmp replacements.
Remove the deprecated (well, renamed) "allow broken intradoc links" cfg flag, which exposes a ton of broken doc links. Mostly just uses of [] or <> that aren't in backticks. Fix them all. The one morally questionable change is to change two doclink references to Policy::enumerate_policy_tree to no longer be doclinks. The problem is that this function only exists when the `compiler` flag is on. In master in ebaa31b we just removed these references as well, but arguably we should have fixed them. Anyway in 9.x we're certainly not going to bend over backward to fix stuff like this.
Split off because I imagine these ones will be easier to review.
We have a `pub mod tests` module which is commented as being public "in case dependent libraries want to use these functions". However, it's also gated by #[cfg(test)]. I am not aware of any way that dependent libraries could compile *this* one with cfg(test) on. So this module was, in effect, never public. Make it non-pub to make things clearer, and also to silence all the "missing docs" warnings that appear when running clippy with --all-targets. This is NOT an API-breaking change even though it removes a public module, because the module was never actually usable.
Ok, I had to add a whole new commit which changes a bunch of doc syntax. So I guess I need a re-ACK @sanket1729 |
Ok, got my local CI to run on the tip. Didn't try the other commits -- the first one doesn't work for me because the Tested 0679c7a with local CI. |
According to crates.io there are a bunch of things still using 9.x. We really haven't made an effort to backport stuff this far, mainly because the crate is nearly impossible to build with the ancient
bitcoind
dev-dependency. This PR removes that and adds a lockfile, which should make this version maintainable going forward.I don't intend to backport any of the missed backports, at least not this weekend, but going forward I'll try to remember to include it in our backport set.