Repository navigation
Resolve minimal versions in Cargo-minimal.lock on dependency changes - #4898
Conversation
* Standardizing the minimal versions of `serde_json` and `serde_test` in the workspace. This allows the unstable "direct-minimal-versions" flag of cargo to be used since it requires one minimal version in a workspace. Since these are all dev dependencies (including the fuzz crate) there shouldn't be any change for external consumers. * arrayvec needs a small bump due to its version in hex. * Arbitrary 1.4.0 does not work with the current 1.63.0 MSRV due to some core::error usage. * Update serde's contraint to the minimum version which the workspace has been using due to implicit upgrades. Attempts were first made to see if 1.0.103 could be used, but at the very least, would require a fair amount of lint settings to be overridden due to the old code. 1.0.195 is used because it also irons out an issue where old versions of serde pulled in old proc_macro2 versions which use a nightly feature, `proc_macro_span_shrink`, that has been dropped.
Instead of letting minimal versions potentially drift upwards, reset the Cargo-minimal.lock file each time dependencies are updated. The new script uses a combination of the `direct-minimal-version` and `minimal-versions` flags to ensure the minimal version dependency tree is tested.
Ensure all optional feature dependencies are tested when creating the lock files. rust-bitcoin's dependency tree is so lean right now though, this is currently a no-op.
Pull Request Test Coverage Report for Build 17082959623Details
💛 - Coveralls |
|
Thanks for the work man. My ack is only a soft one because I'm not super versed or as concerned as I probably should be with all the lock files and whatnot. |
|
In d39a8ac: Always good to do more checks, but fwiw the call to |
|
Oh, never mind me, the And yes, |
I initially wrote off |
|
Lockfiles always include all dependencies for all features and all targets. This is actually extremely annoying because it means that the lockfiles we ship with this library are full of dev-dependency crap and stuff for systems that nobody uses. And there is no tooling for filtering, diffing, or merging these. But it's better than Python, so 🤷 |
Ah TIL thanks, not sure why I assumed otherwise. Given this, I think it makes sense to just use Did have ai make me this little table fwiw. |
Attempt two to close #4313
I first attempted to iron out dependency drift in #4330, but wasn't quite able to check all the boxes. I think I might have now though by just running the two cargo flags,
direct-minimal-versionsandminimal-versions, one after the other in the update lock file script. Runningdirectfirst checks for the issue where direct dependencies might be lying. And runningminimal-versionsafter that forces all transitive versions down to their minimums, fixing any drift (can see this in the lock file change). We can trust thatminimal-versionswon't bump our own direct deps because we just checked them.The first commit is ironing out little issues required to use
direct-minimal-versions. Essentially fixing manifests which are out of date and lying about the required version. Theserdebump might be a large one, but I was running into an issue where it was pulling in an oldproc-macro2which required a rust compiler option,proc_macro_span_shrink, that is no longer available.The second commit updates the lock file script to use the new flags and generates the new lock files.
The third commit might be drop-able, but I found it kinda of strange that only the default features where being used to generate the dependency lock files. Now, granted, the rust-bitcoin dependency tree is so lean that it appears enabling all features doesn't add any new dependencies, but still makes me feel better for the future.