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

features on workspace #5251

Closed
driftluo opened this issue Mar 27, 2018 · 1 comment
Closed

features on workspace #5251

driftluo opened this issue Mar 27, 2018 · 1 comment

Comments

@driftluo
Copy link

driftluo commented Mar 27, 2018

Today, I encountered a problem with the overall compilation of the workspace and the inconsistent compilation of each crate.

We have a public logger crate, the default is output to a file, open console features will be output to the terminal.

Some crates in the workspace have this feature turned on, while others do not need to be turned on.

Cargo bulid --all will cause the entire workspace's crates to be output to the terminal.

Compile each crate separately, it will normal to open different logger modes.

This behavior makes me very confused.

relate: #4463

@matklad
Copy link
Member

matklad commented Mar 27, 2018

@driftluo yep, this is a duplicate of #4463, so closing the issue in favor of that one.

Note, however, that Cargo features are intended to be additive. That is, from Cargo's point of view, it's never a semantic error to activate more features than actually necessary. So in that sense, using a cargo feature to determine if the logging should go to file or to the console might not be the best approach.

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

2 participants