-
Notifications
You must be signed in to change notification settings - Fork 283
Description
Hey! Let me know if i'm missing anything for issues or you need more details. This version of log is being pulled in from the lib-p2p lib and is having trouble compiling. I've tried manually updating the macro to add the Into implementation that it requires but it does seem to already be there. Not sure how to troubleshoot this further as it seems like the macro generation just isn't occurring. That's likely not the case, just symptoms.
You can see an implementation for u128 is needed: Into<ValueBag<'_>>` for `u128.
In the macro_rules! it's clearly there so i'm not sure what's going on. (full error down below)
impl_to_value_primitive![
385 | | usize, u8, u16, u32, u64, u128, isize, i8, i16, i32, i64, i128, f32, f64, char, bool,
386 | | ];
System:
Macbook Pro 14in, 2021
Apple M1 Pro chip
macOS Monterey v12.2.1
It may be possible this is due to the M1 chip but i'm not sure why. It does compile just fine on my intel and ryzen machines. Just a hunch though, I have no real evidence for that claim and it's the only distinct difference I can find at the moment.
Thanks!
❯ cargo build
Compiling log v0.4.14
Compiling futures-executor v0.3.21
error[E0277]: the trait bound `ValueBag<'_>: From<u128>` is not satisfied
--> /Users/alecsavoy/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.14/src/kv/value.rs:364:21
|
364 | Value::from_value_bag(value)
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<u128>` is not implemented for `ValueBag<'_>`
...
384 | / impl_to_value_primitive![
385 | | usize, u8, u16, u32, u64, u128, isize, i8, i16, i32, i64, i128, f32, f64, char, bool,
386 | | ];
| |_- in this macro invocation
|
= help: the following implementations were found:
<ValueBag<'v> as From<&'a ()>>
<ValueBag<'v> as From<&'a bool>>
<ValueBag<'v> as From<&'a char>>
<ValueBag<'v> as From<&'a f32>>
and 29 others
= note: required because of the requirements on the impl of `Into<ValueBag<'_>>` for `u128`
note: required by a bound in `value::Value::<'v>::from_value_bag`
--> /Users/alecsavoy/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.14/src/kv/value.rs:250:12
|
248 | fn from_value_bag<T>(value: T) -> Self
| -------------- required by a bound in this
249 | where
250 | T: Into<ValueBag<'v>>,
| ^^^^^^^^^^^^^^^^^^ required by this bound in `value::Value::<'v>::from_value_bag`
= note: this error originates in the macro `impl_to_value_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `ValueBag<'_>: From<i128>` is not satisfied
--> /Users/alecsavoy/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.14/src/kv/value.rs:364:21
|
364 | Value::from_value_bag(value)
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<i128>` is not implemented for `ValueBag<'_>`
...
384 | / impl_to_value_primitive![
385 | | usize, u8, u16, u32, u64, u128, isize, i8, i16, i32, i64, i128, f32, f64, char, bool,
386 | | ];
| |_- in this macro invocation
|
= help: the following implementations were found:
<ValueBag<'v> as From<&'a ()>>
<ValueBag<'v> as From<&'a bool>>
<ValueBag<'v> as From<&'a char>>
<ValueBag<'v> as From<&'a f32>>
and 29 others
= note: required because of the requirements on the impl of `Into<ValueBag<'_>>` for `i128`
note: required by a bound in `value::Value::<'v>::from_value_bag`
--> /Users/alecsavoy/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.14/src/kv/value.rs:250:12
|
248 | fn from_value_bag<T>(value: T) -> Self
| -------------- required by a bound in this
249 | where
250 | T: Into<ValueBag<'v>>,
| ^^^^^^^^^^^^^^^^^^ required by this bound in `value::Value::<'v>::from_value_bag`
= note: this error originates in the macro `impl_to_value_primitive` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `log` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed