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

build: Don't build clap if we're being used as a library. #1111

Closed
wants to merge 2 commits into from

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Oct 28, 2017

This allows Firefox not to build clap.

@emilio
Copy link
Contributor Author

emilio commented Oct 28, 2017

r? @fitzgen

@emilio
Copy link
Contributor Author

emilio commented Oct 28, 2017

(or @pepyakin, or anyone else really)

@pepyakin
Copy link
Contributor

So, now instead of cargo run one should do cargo run --features="binaries"?
Is there a way to leave cargo run as it?

@emilio
Copy link
Contributor Author

emilio commented Oct 28, 2017

Hmm... Not that I know of unfortunately.

@KiChjang
Copy link
Member

cargo install bindgen would also be affected. However I think this is ok as long as we make it very clear (in the docs and everywhere) that you need to add the --features="binaries" flag.

@emilio
Copy link
Contributor Author

emilio commented Oct 28, 2017

We can also make binaries a default feature, but it's unfortunate that it becomes opt-out for library users.

@SimonSapin
Copy link
Contributor

Doesn’t required-features in the [[bin]] section (as already in the PR) fix all this?

@pepyakin
Copy link
Contributor

@SimonSapin my first impression was the same :)

But when I tried cargo run it said:

error: target `bindgen` requires the features: `binaries`
Consider enabling them by passing e.g. `--features="binaries"`

@SimonSapin
Copy link
Contributor

That’s just silly… but I suspect that fixing it properly in Cargo requires fixing rust-lang/cargo#4463 first.

@bors-servo
Copy link

☔ The latest upstream changes (presumably #1126) made this pull request unmergeable. Please resolve the merge conflicts.

@emilio
Copy link
Contributor Author

emilio commented Jun 25, 2019

Closing in favor of #1581

@emilio emilio closed this Jun 25, 2019
@emilio emilio deleted the clap-out branch June 25, 2019 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants