Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.9 release seems to break tokio (which depends on log) #369

Closed
alex opened this issue Dec 15, 2019 · 8 comments
Closed

0.4.9 release seems to break tokio (which depends on log) #369

alex opened this issue Dec 15, 2019 · 8 comments

Comments

@alex
Copy link
Contributor

@alex alex commented Dec 15, 2019

You can see an example of this here: https://github.com/alex/otp-cop/pull/374/checks?check_run_id=349720268

I didn't see a mention of breaking changes (besides MSRV) in the CHANGELOG, so I'm filing this here. Let me know if this should be filed on tokio instead though!

@mojzu
Copy link

@mojzu mojzu commented Dec 15, 2019

I am receiving similar errors trying to install cargo-make.

   Compiling cargo-make v0.24.1
error: macro expansion ignores token `if` and any following
   --> <::log::macros::log_impl macros>:13:23
    |
13  |       let lvl = $ lvl ; if lvl <= $ crate :: STATIC_MAX_LEVEL && lvl <= $ crate
    |                         ^^
    | 
   ::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/cargo-make-0.24.1/src/lib/cache.rs:106:47
    |
106 |   ...                   Err(error) => info!(
    |  _____________________________________-
107 | | ...                       "Error while writing to cache file: {:#?}, error: {:#?}",
108 | | ...                       &file_name, error
109 | | ...                   ),
    | |                       -
    | |                       |
    | |_______________________caused by the macro expansion here
    |                         help: you might be missing a semicolon here: `;`
    |
    = note: the usage of `log_impl!` is likely invalid in expression context
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

...
@hecrj
Copy link

@hecrj hecrj commented Dec 15, 2019

It seems to break relevant and gfx-backend-vulkan too.

@pythondude325
Copy link

@pythondude325 pythondude325 commented Dec 15, 2019

This also breaks goblin

@sfackler
Copy link
Member

@sfackler sfackler commented Dec 15, 2019

I've yanked the 0.4.9 release.

@KodrAus It looks like all of the code blocks in the log_impl macro need to be contained in a block - how did CI pass after the KV stuff landed?

@sfackler sfackler closed this Dec 15, 2019
@mojzu
Copy link

@mojzu mojzu commented Dec 15, 2019

Install cargo-make is working again, thank you for the very quick fix!

@KodrAus
Copy link
Contributor

@KodrAus KodrAus commented Dec 15, 2019

@sfackler Hm that's a good question... I'll check this out now.

@KodrAus
Copy link
Contributor

@KodrAus KodrAus commented Dec 16, 2019

Ok, it looks like with our macro tests being brand new we didn't have coverage for the macros in expression context so CI didn't pick this up. I also totally missed this when reviewing the original implementation.

I'm putting together a PR now to fix this up.

@KodrAus
Copy link
Contributor

@KodrAus KodrAus commented Dec 16, 2019

I've just published 0.4.10 that fixes this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants
You can’t perform that action at this time.