-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add a way to tell rustpkg not to install all the crate files in a package #8892
Comments
I also picked up on this pattern myself, so |
I think this will fall out of my work on #7879 but I'm not totally sure. In particular: there's a question of, does building a package mean building every crate file in any subdirectory of the package directory? Or, does it mean building the crates in the top-level directory, plus all their dependencies (searching subdirectories of the package dir as well as the RUST_PATH)? If the latter, then this bug will become a non-issue, but if the former, it's still an issue. |
Closely related to #7240 |
What do you think about having the main crate files simply be put in the src directory? For example for glfw: glfw-rs/src/lib.rs // #[crate_id = "github.com/bjz/glfw-rs#glfw:0.1"];
glfw-rs/src/examples/window/main.rs // extern mod glfw; Executing Also this removes the repeated name. Let's say I have a project foobar and am using rustpkg for building it. The package id would then also be an optional argument for |
rustpkg is gone. |
…, r=Manishearth Fix `empty_line_after_outer_attribute` false positive This PR fixes a false positive in `empty_line_after_outer_attribute`. Here is a minimal example that trigger the FP: ```rust #[derive(clap::Parser)] #[clap(after_help = "This ia a help message. You're welcome. ")] pub struct Args; ``` changelog: PF: [`empty_line_after_outer_attribute`]: No longer lints empty lines in inner string values.
@metajack pointed out that a library might have a main crate, and then a
src/examples
directory containing lots of subdirectories with main.rs files. If yourustpkg install
, you probably don't want to install the example programs. Maybe we could add another "magic" filename for files we want to build but not install. Or maybe there's another solution.The text was updated successfully, but these errors were encountered: