rust-lang / backtrace-rs

Backtraces in Rust
https://docs.rs/backtrace
Other
524 stars 240 forks source link

reduce dependencies for windows-msvc targets #543

Closed klensy closed 1 year ago

klensy commented 1 year ago

Some dependencies don't used on windows-msvc targets, so exclude them:

Will sync with rust repo

klensy commented 1 year ago

Should anything be fixed in https://github.com/rust-lang/backtrace-rs/blob/master/crates/as-if-std/Cargo.toml?

Looking at https://github.com/rust-lang/backtrace-rs/blob/e1c49fbd6124a1b626cdf19871aff68c362bdf07/src/symbolize/mod.rs#L466-L485 gimli module never used on windows-msvc targets?

addr2line used only in gimli module which is unused on windows-msvc and backtrace_in_libstd feature?

workingjubilee commented 1 year ago

I believe this would/should address this issue:

So, yes.

klensy commented 1 year ago

Should anything be fixed in https://github.com/rust-lang/backtrace-rs/blob/master/crates/as-if-std/Cargo.toml?

Last question left.

workingjubilee commented 1 year ago

So I believe they should have matching cfgs for their deps, especially if that would allow us to build less deps while building std? But perhaps I am wrong somehow?

philipc commented 1 year ago

Yes, the deps in as-if-std/Cargo.toml must match the main Cargo.toml. They are only duplicated there because there's no other way to do it, not because they might be different.

klensy commented 1 year ago

Okay, looks like it ready.

klensy commented 1 year ago

nano ping.

klensy commented 1 year ago

Can this be reviewed, so able to be merged in rust repo? Thanks.

workingjubilee commented 1 year ago

This is still on my radar, my most recent agenda has been pushing a few PRs that were opened in 2022(!) or even 2021(!) over the edge now that some of them have been unblocked.

workingjubilee commented 1 year ago

Blech, merge conflicts...

klensy commented 1 year ago

For some reason CI have troubles downloading syn for windows.

ChrisDenton commented 1 year ago

syn has been causing a lot of intermittent issues in CI lately, across a number of different repositories.

Edit: well I don't know if syn is the root cause or just a common symptom.

workingjubilee commented 12 months ago

It is possible that the author's recent choice to ship precompiled binaries for certain relevant proc-macros is taxing various points of network IO more severely: https://github.com/serde-rs/serde/issues/2538

pacak commented 12 months ago

is taxing various points of network IO more severely

The binary in question is 680kb compresses down to 300kb. Shipping a binary is not the best idea, but I don't think it should affect network that much.

workingjubilee commented 12 months ago

Yah, dtolnay thinks it's a cargo bug and I think he's right.

klensy commented 12 months ago

Funny thing, now i see this here: https://github.com/rust-lang/rust/actions/runs/5887880758/job/15968022846?pr=114923

Thu, 17 Aug 2023 07:15:39 GMT       Updating crates.io index
Thu, 17 Aug 2023 07:16:10 GMT   warning: spurious network error (3 tries remaining): [28] Timeout was reached (Operation too slow. Less than 10 bytes/sec transferred the last 30 seconds)
Thu, 17 Aug 2023 07:16:40 GMT   warning: spurious network error (2 tries remaining): [28] Timeout was reached (Operation too slow. Less than 10 bytes/sec transferred the last 30 seconds)
Thu, 17 Aug 2023 07:17:14 GMT   warning: spurious network error (1 tries remaining): [28] Timeout was reached (Operation too slow. Less than 10 bytes/sec transferred the last 30 seconds)
Thu, 17 Aug 2023 07:17:50 GMT   error: failed to get `zerofrom-derive` as a dependency of package `zerofrom v0.1.2`
Thu, 17 Aug 2023 07:17:50 GMT       ... which satisfies dependency `zerofrom = "^0.1.1"` (locked to 0.1.2) of package `icu_provider v1.2.0`
Thu, 17 Aug 2023 07:17:50 GMT       ... which satisfies dependency `icu_provider = "^1.2.0"` (locked to 1.2.0) of package `icu_list v1.2.0`
Thu, 17 Aug 2023 07:17:50 GMT       ... which satisfies dependency `icu_list = "^1.2"` (locked to 1.2.0) of package `rustc_baked_icu_data v0.0.0 (/checkout/compiler/rustc_baked_icu_data)`
Thu, 17 Aug 2023 07:17:50 GMT       ... which satisfies path dependency `rustc_baked_icu_data` (locked to 0.0.0) of package `rustc_error_messages v0.0.0 (/checkout/compiler/rustc_error_messages)`
Thu, 17 Aug 2023 07:17:50 GMT       ... which satisfies path dependency `rustc_error_messages` (locked to 0.0.0) of package `rustc_driver_impl v0.0.0 (/checkout/compiler/rustc_driver_impl)`
Thu, 17 Aug 2023 07:17:50 GMT       ... which satisfies path dependency `rustc_driver_impl` (locked to 0.0.0) of package `rustc-main v0.0.0 (/checkout/compiler/rustc)`