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

Fixed the bogus dev-dependencies pull in on regular build #1797

Closed
wants to merge 1 commit into from

Conversation

farcaller
Copy link

Do not pull in dev-dependencies unless it's a test or bench build (see #1796 for additional details).

The primary use case is proper cross-building of crates with unit tests, where it's impossible (or highly unreasonable) to cross-build the test frameworks.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

Thanks! Could you also add a test for this?

@farcaller farcaller reopened this Jul 10, 2015
@farcaller
Copy link
Author

This patch breaks test_cargo_test::example_dev_dep.

My own opinion is that the example code shouldn't pull in the dev deps, as having example binaries being cross-compiled is perfectly valid use case while I can hardly imagine the need to use any additional code in examples that are not covered by main crate deps. Any advice on why that test exists in a way it exists?

@alexcrichton
Copy link
Member

That's a test for how examples are specc'd which is that examples have access to dev-dependencies (e.g. it's a legit failure)

@farcaller
Copy link
Author

After discussing over irc I now understand better how exactly it is legit. I will try to dig deeper to make a fix for original issue in #1796 without breaking the example use case.

@farcaller
Copy link
Author

This seem to be a much bigger issue then two LoC change, I'm closing this PR continuing my investigation in #1796.

@farcaller farcaller closed this Jul 11, 2015
@farcaller farcaller deleted the patch-1 branch July 11, 2015 11:02
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 this pull request may close these issues.

3 participants