-
Notifications
You must be signed in to change notification settings - Fork 533
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
Remove time 0.1 as optional dependency #1095
Conversation
c8abde2
to
a239874
Compare
db744aa
to
37592e2
Compare
I have started a crater(-like) run. It only checks if a crate still builds with this patch. In the first 500 crates it found 5 regressions, of which as far as I can see 2 are real:
|
Do you have full error messages for these? |
It is all pretty manual 😞. This is the error for u2fs-rs (still have the terminal with my manual run open):
And astrolab-smart-coffee-types:
|
Something I've wanted before is to have a crater-like program for ordinary crates. This serves as a good reminder for me to work on it. Of the two regressions found, one appears unmaintained and the other doesn't appear to actually be used for anything (most days have a download count of zero). |
Now at crate 1000 of the 7227. I will report back when finished. One more regression found: Error
|
This is the primitive code I am using: use crates_io_api::SyncClient;
use rustwide::{cmd::SandboxBuilder, Crate, Toolchain, WorkspaceBuilder};
use std::error::Error;
use std::path::Path;
fn main() -> Result<(), Box<dyn Error>> {
let crates = SyncClient::new(
"chrono (https://github.com/chronotope/chrono)",
std::time::Duration::from_millis(1000),
)?;
let workspace = WorkspaceBuilder::new(Path::new("/home/pitdicker/crater"), "").init()?;
let toolchain = Toolchain::dist("stable");
let sandbox = SandboxBuilder::new()
.memory_limit(Some(1 * 1024 * 1024 * 1024))
.enable_networking(false);
crates
.crate_reverse_dependencies("chrono")?
.dependencies
.iter()
.for_each(|dep| {
let id = dep.crate_version.crate_name.clone();
let num = dep.crate_version.num.clone();
let crate_id = format!("{} {} (chrono {})", &id, &num, &dep.dependency.req);
let krate = Crate::crates_io(&id, &num);
krate.fetch(&workspace).unwrap();
let mut build_dir = workspace.build_dir("build");
let new = build_dir
.build(&toolchain, &krate, sandbox.clone())
.patch_with_git(
"chrono",
"https://github.com/pitdicker/chrono",
"remove_time_0.1",
)
.run(|build| {
build.cargo().args(&["check"]).run()?;
Ok(())
});
if new.is_ok() {
println!("{}: keeps building", crate_id);
} else {
match build_dir
.build(&toolchain, &krate, sandbox.clone())
.run(|build| {
build.cargo().args(&["check"]).run()?;
Ok(())
}) {
Ok(_) => println!("{}: regressed", crate_id),
Err(e) => println!("{}: failed to build. {:?}", crate_id, e),
}
}
});
Ok(())
} |
@pitdicker awesome work, thanks for getting this done! |
Thank you. But the run is only at 20% now, it wil take some more time... |
I have stopped the run at 3000 crates. What order crates.io returns reverse dependencies I don't know exactly. It is some combination of popularity, or downloads, or number of reverse dependencies. Anyway, after 3000 crates we are in the long tail of one-off projects with less than 1500 downloads, no reverse dependencies, and in quite a number of cases unmaintained. Found 6 more regressions: exonum-api 1.0.0. Depends on old version of actix-http-1.0.1, seems to be fixed on master Error message
nature-db. Depends on old version of actix-http-1.0.1: Error message
Error message
game_time 0.2.0 => depends on float_duration eternal 0.3.2. github repo no longer exists. Error message
This brings the number my primitive crater run found to 9 crates. 3 of those fail to compile the old dependency actix-http-1.0.1. And eternal 0.3.2 seems to have vendored that code. All haven't seen a release in a couple of years, and don't really effect the crates.io ecosystem. |
37592e2
to
853a575
Compare
So to put everything together:
I've asked an Actix maintainer whether it would be feasible to release an actix-http 1.0.2 to fix those dependencies. We should probably do some outreach for u2f/Tauri and float_duration/Osmon. |
Made a PR to u2f: wisespace-io/u2f-rs#9 |
And a PR against float-duration: tylerreisinger/rust-float-duration#5 |
Filed a heads-up against the tauri-plugin-authenticator repo in tauri-apps/plugins-workspace#411. Seems they don't want us to block on their usage. The Actix maintainer does not want to issue an actix-http 1.0.2 release because that stuff might also have vulnerabilities and/or license violations in it, they will look into helping their downstreams to upgrade to a newer Actix release. |
e981f3f
to
a9656c2
Compare
@djc What are your thoughts on making the jump? |
I've reached out to the exonum maintainer in an issue. Let's give them a week to respond. |
b1ad8e2
to
b67fced
Compare
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.
LGTM
The sometimes aliasing of chrono::duration::Duration as OldDuration
can be changed in another PR.
@djc How do you feel about putting out a release with this? |
debdc58
to
9b3311b
Compare
Given that we have so many changes on 0.4.x now, I feel uncomfortable putting this out into the same release as the other changes. Let's do another release for all the other stuff, wait a few days for feedback and then merge and release this. |
Codecov Report
@@ Coverage Diff @@
## 0.4.x #1095 +/- ##
==========================================
+ Coverage 91.38% 91.40% +0.01%
==========================================
Files 37 38 +1
Lines 16467 16933 +466
==========================================
+ Hits 15049 15478 +429
- Misses 1418 1455 +37
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Can I do something to help prepare? |
Made a list of changes since the last release: https://gist.github.com/pitdicker/e13d4295cca6d5c118b88d621ce1e2d8 |
Can you make that into a draft GitHub release, and make sure to call out external contributors (anyone not you or me) as we've done in previous release notes? |
I did not know that button 😄 |
4bf7a7c
to
49deb3c
Compare
49deb3c
to
0bcc389
Compare
Are we ready to merge? Not that I have been looking forward to it or something 😆 |
Yes, let's do it! Can you submit a version bump PR and draft release notes? |
I just want to say: thank you so much for taking the time to make this happen. Sometimes OS development is less about "solving great problems in great way", and more about supporting your community and a bit of grinding. Everyone appreciates this effort: I'm confident I can say this for all rust developers depending on chrono. |
Well, we'll see how much hidden breakage comes out of the woodwork and/or how many people will complain that we're breaking the semver contract. Worst comes to worst, we may need to revert this change -- let's see how it goes. |
See #1073.
Fixes #876, #285.