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

loom dependency pulled in by default #411

Closed
djc opened this issue Jul 7, 2020 · 2 comments · Fixed by #416
Closed

loom dependency pulled in by default #411

djc opened this issue Jul 7, 2020 · 2 comments · Fixed by #416

Comments

@djc
Copy link

djc commented Jul 7, 2020

Since #392 (by @taiki-e), it looks like loom went from a dev-dependency to a default dependency. It's guarded by cfg(loom), but I'm not sure if that's working as intended. My application now seems to be pulling in loom as a dependency of bytes even though I didn't specify any loom cfg. As far as I understand, loom should only be used for testing?

@djc
Copy link
Author

djc commented Jul 7, 2020

Ah, sorry, I got confused by cargo update calling this out, but it doesn't look like this gets built without --cfg loom enabled. It just clutters up Cargo.lock files, which had me confused for a moment.

@djc djc closed this as completed Jul 7, 2020
@taiki-e
Copy link
Member

taiki-e commented Jul 7, 2020

Yeah, cargo writes all target.cfg(..).dependencies to Cargo.lock even if it never activates (this is the same as target.cfg(windows), target.cfg(unix), etc.). But unless you set RUSTFLAGS, they will never actually be compiled.

Also, target.cfg(..).dependencies are basically supported except cfg(feature = ..), cfg(test), etc (see rust-lang/cargo#7660 (comment))

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

Successfully merging a pull request may close this issue.

2 participants