Smithay / calloop

A callback-based Event Loop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unstable feature is used when checking coverage in upstream crate

kjetilkjeka opened this issue · comments

We have recently introduced a transitive dependency on calloop for one of our crates we test coverage for.

After introducing this dependency we cannot use the stable compiler to test for coverage due to the error message.

error[E0554]: `#![feature]` may not be used on the stable release channel
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/calloop-0.10.3/src/lib.rs:146:23
    |
146 | #![cfg_attr(coverage, feature(no_coverage))]
    |                       ^^^^^^^^^^^^^^^^^^^^

I assume this feature exists for testing the coverage of calloop itself, and there are not much reason to use it when calloop is used as a dependency?

Would it be acceptable to make a similar solution where features are not enabled for upstream crates? For instance by creating a feature on the crate itself?

Ah yeah, I didn't anticipate this issue, that's unfortunate. Indeed moving to a cargo feature is certainly the right thing to do.