Amanieu / thread_local-rs

Per-object thread-local storage for Rust
Apache License 2.0
328 stars 41 forks source link

Use a slightly different work-around for criterion #32

Open infinity0 opened 2 years ago

infinity0 commented 2 years ago

My motivation is slightly unrelated to this package but I was hoping this general technique might be acceptable you and/or the wider Rust community.

Putting dev-dependencies as optional dependencies interferes with Debian packaging. The automated packaging tools are set up to avoid dev-dependencies; however all optional dependencies have to be installable for Debian QA purposes. Linking the QA of criterion to the QA of thread_local makes things inconvenient. We can (and do) patch this out in Debian, but apparently quite a few crates are using this current work-around, and maintaining these patches is time-consuming.

This PR changes the current work-around to a different work-around that doesn't affect automated crate-processing tools so much. This is not specific to Debian, for example other commenters in rust-lang/cargo#1596 noted that the current work-around is visible on crates.io and might mislead some users.

Amanieu commented 2 years ago

I think that we can just change this to a normal dev-dependency. This was originally done to keep CI working on Rust 1.28, but a) our CI script now uses Rust 1.36 and b) it doesn't even work any more since travis-ci.org shut down.