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

Move subcommand modules to match cargo conventions #738

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

mattico
Copy link
Contributor

@mattico mattico commented Jul 24, 2018

This helps prepare for the 2018 edition, where our bin directory won't work:

warning: An explicit [[bin]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other binary targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a binary target:

  • /home/travis/build/rust-lang-nursery/mdBook/src/bin/build.rs
  • /home/travis/build/rust-lang-nursery/mdBook/src/bin/clean.rs
  • /home/travis/build/rust-lang-nursery/mdBook/src/bin/init.rs
  • /home/travis/build/rust-lang-nursery/mdBook/src/bin/serve.rs
  • /home/travis/build/rust-lang-nursery/mdBook/src/bin/test.rs
  • /home/travis/build/rust-lang-nursery/mdBook/src/bin/watch.rs

This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a binary target today. You can future-proof yourself
and disable this warning by adding autobins = false to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.

For more information on this warning you can consult rust-lang/cargo#5330

@mattico mattico merged commit c9a9987 into rust-lang:master Jul 24, 2018
@mattico mattico deleted the fix-cargo-bin branch July 24, 2018 21:47
Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
Move subcommand modules to match cargo conventions
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.

1 participant