8000 Release another 0.5.x with forward support of 0.6 · Issue #866 · bheisler/criterion.rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Release another 0.5.x with forward support of 0.6 #866
Open
@nyurik

Description

@nyurik

A popular pprof crate relies on criterion 0.5, and it might take some time for it to be updated. Would it make sense to release another patch to 0.5 version that actually relies on 0.6, and re-exports some internals from it?

I get this error, which i think would go away if 0.5 actually reexports 0.6:

error[E0277]: the trait bound `PProfProfiler<'_, '_>: Profiler` is not satisfied
   --> martin/benches/bench.rs:74:49
    |
74  |     config = Criterion::default().with_profiler(PProfProfiler::new(1000, Output::Flamegraph(None)));
    |                                   ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Profiler` is not implemented for `PProfProfiler<'_, '_>`
    |                                   |
    |                                   required by a bound introduced by this call
    |
note: there are multiple different versions of crate `criterion` in the dependency graph
   --> /home/nyurik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/criterion-0.6.0/src/profiler.rs:9:1
    |
9   | pub trait Profiler {
    | ^^^^^^^^^^^^^^^^^^ this is the required trait
    |
   ::: martin/benches/bench.rs:2:5
    |
2   | use criterion::async_executor::FuturesExecutor;
    |     --------- one version of crate `criterion` used here, as a direct dependency of the current crate
...
7   | use pprof::criterion::{Output, PProfProfiler};
    |     ----- one version of crate `criterion` used here, as a dependency of crate `pprof`
    |
   ::: /home/nyurik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pprof-0.14.0/src/criterion.rs:32:1
    |
32  | pub struct PProfProfiler<'a, 'b> {
    | -------------------------------- this type doesn't implement the required trait
    |
   ::: /home/nyurik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/criterion-0.5.1/src/benchmark_group.rs:473:5
    |
473 |     pub trait Sealed {}
    |     ---------------- this is the found trait
    = help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `Criterion::<M>::with_profiler`
   --> /home/nyurik/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/criterion-0.6.0/src/lib.rs:470:29
    |
470 |     pub fn with_profiler<P: Profiler + 'static>(self, p: P) -> Criterion<M> {
    |                             ^^^^^^^^ required by this bound in `Criterion::<M>::with_profiler`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0