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

Compilation error #41

Closed
adaszko opened this issue Aug 18, 2019 · 5 comments
Closed

Compilation error #41

adaszko opened this issue Aug 18, 2019 · 5 comments

Comments

@adaszko
Copy link

adaszko commented Aug 18, 2019

Hi, I'm getting this compilation error after adding actix-web = "1.0" to my Cargo.toml:

   Compiling onus v0.1.0
   Compiling failure v0.1.5
   Compiling actix-codec v0.1.2
   Compiling actix-threadpool v0.1.2
   Compiling serde_urlencoded v0.6.1
   Compiling serde_json v1.0.40
   Compiling serde_urlencoded v0.5.5
   Compiling actix-router v0.1.5
   Compiling rusty_ulid v0.9.0
error: cannot find macro `log!` in this scope
   --> /Users/adaszko/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-codec-0.1.2/src/framed_read.rs:195:17
    |
195 |                 trace!("attempting to decode a frame");
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: cannot find macro `log!` in this scope
   --> /Users/adaszko/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-codec-0.1.2/src/framed_read.rs:198:21
    |
198 |                     trace!("frame decoded from buffer");
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: cannot find macro `log!` in this scope
   --> /Users/adaszko/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-codec-0.1.2/src/framed_write.rs:246:9
    |
246 |         trace!("flushing framed transport");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: cannot find macro `log!` in this scope
   --> /Users/adaszko/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-codec-0.1.2/src/framed_write.rs:249:13
    |
249 |             trace!("writing; remaining={}", self.buffer.len());
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: cannot find macro `log!` in this scope
   --> /Users/adaszko/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-codec-0.1.2/src/framed_write.rs:270:9
    |
270 |         trace!("framed transport flushed");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: cannot find macro `log!` in this scope
  --> /Users/adaszko/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-threadpool-0.1.2/src/lib.rs:21:21
   |
21 |                     log::error!("Can not parse ACTIX_THREADPOOL value");
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: cannot find macro `log!` in this scope
   --> /Users/adaszko/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-router-0.1.5/src/resource.rs:206:29
    |
206 | /                             log::error!(
207 | |                                 "Dynamic path match but not all segments found: {}",
208 | |                                 name
209 | |                             );
    | |______________________________^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: cannot find macro `log!` in this scope
   --> /Users/adaszko/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-router-0.1.5/src/resource.rs:278:29
    |
278 | /                             log::error!(
279 | |                                 "Dynamic path match but not all segments found: {}",
280 | |                                 name
281 | |                             );
    | |______________________________^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to previous error

error: Could not compile `actix-threadpool`.
warning: build failed, waiting for other jobs to finish...
error: aborting due to 5 previous errors

error: Could not compile `actix-codec`.
warning: build failed, waiting for other jobs to finish...
error: aborting due to 2 previous errors

error: Could not compile `actix-router`.
warning: build failed, waiting for other jobs to finish...
error: build failed

I'm aware of #21. I have this bit in my Cargo.toml:

[package]
[...]
edition = "2018"

This happens on both stable 1.36.0 and today's nightly.

@JohnTitor
Copy link
Member

Could you provide reproducible steps? I cannot see the errors.

@adaszko
Copy link
Author

adaszko commented Aug 18, 2019

I'm not able to provide repeatable steps to reproduce but I fixed the problem by upgrading another dependency, rand from 0.6.5 to 0.7.0 which resulted in a different dependency graph in which newer log package version was picked (0.4.8 as opposed to 0.4.1). I'm sure why that helped though. Neither 0.4.8 nor 0.4.1 has edition set in their Cargo.toml. actix-codec does have it set.

@adaszko
Copy link
Author

adaszko commented Aug 18, 2019

OK, the cause seems to be the rand package upgrading to 2018 edition after 0.6.5 was released.

@JohnTitor
Copy link
Member

Ah, then this issue can be closed?

@bitemyapp
Copy link

Closing based on what @adaszko said, please re-open if we misunderstood.

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

No branches or pull requests

3 participants