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

cargo clippy + cargo check fail because of --emit asm #12

Closed
ashleygwilliams opened this issue Mar 22, 2019 · 7 comments
Closed

cargo clippy + cargo check fail because of --emit asm #12

ashleygwilliams opened this issue Mar 22, 2019 · 7 comments
Assignees

Comments

@ashleygwilliams
Copy link
Contributor

ag-dubss-MacBook-Pro:boringtun ag_dubs$ cargo clippy
    Checking boringtun v0.2.0 (/Users/ag_dubs/CloudFlare/boringtun)
error: crate `base64` required to be available in rlib format, but was not found in this form

error: crate `hex` required to be available in rlib format, but was not found in this form

error: crate `libc` required to be available in rlib format, but was not found in this form

error: crate `ring` required to be available in rlib format, but was not found in this form

error: aborting due to 4 previous errors

error: Could not compile `boringtun`.

To learn more, run the command again with --verbose.
@ashleygwilliams ashleygwilliams changed the title cargo clippy fails because of deps and lib types cargo clippy fails because of --emit asm Mar 22, 2019
@ashleygwilliams
Copy link
Contributor Author

ashleygwilliams commented Mar 22, 2019

this is a thing that cargo shouldn't fail on, but clippy uses cargo check and check does not like asm

i do not believe there is currently a way to ask cargo check to silently fail and let clippy lint so this blocks our usage of clippy.

@ashleygwilliams
Copy link
Contributor Author

@vkrasnov can you tell me more about the motivation to the .cargo/config --emit asm? i'm a little surprised that it's faster.

@ashleygwilliams ashleygwilliams changed the title cargo clippy fails because of --emit asm cargo clippy + cargo check fail because of --emit asm Mar 22, 2019
@vkrasnov
Copy link
Contributor

vkrasnov commented Mar 23, 2019

Me too, but it looks like vectorization doesn't happen when asm is not emitted. I can't really tell, need to look at objdump to see the difference in emitted machine code.

@ashleygwilliams
Copy link
Contributor Author

so i definitely want us to have faster code, but i am a bit sad that this means that we can't enforce clippy on CLI and that contributors will run into a vaguely confusing error when they try to run cargo check or cargo clippy. at best i can document this in the README- but i'm still gonna see if i can ask around about conditionally applying --emit asm only to build and not check (not sure it's possible but we'll see!)

@hellow554
Copy link

Maybe worth opening an ticket in the rust repo?

@gawen
Copy link

gawen commented Jul 7, 2019

As a work around during a development phase, I suggest to comment the following line to make cargo check works:

"--emit", "asm", # For whatever reason rustc produces faster code when this flag is enabled

@jeff-hiner
Copy link
Contributor

jeff-hiner commented Feb 17, 2022

Closed by #223

@jeff-hiner jeff-hiner linked a pull request Feb 17, 2022 that will close this issue
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

5 participants