Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up"cargo check" or similar to run all phases prior to trans #1313
Comments
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
iopq
commented
Feb 16, 2015
|
I compile mostly to check program correctness. I only run the tests when I am about to push my changes. Now, my stuff is toy programs, but if it ever got to the point that I wrote a larger example that took longer to compile this would be great. |
alexcrichton
added
the
A-new-subcommand
label
Feb 16, 2015
This comment has been minimized.
This comment has been minimized.
|
cc #595, this may just be |
This comment has been minimized.
This comment has been minimized.
Valloric
commented
Jun 2, 2015
|
@alexcrichton |
This comment has been minimized.
This comment has been minimized.
norcalli
commented
Jun 5, 2015
|
|
This comment has been minimized.
This comment has been minimized.
DanielKeep
commented
Jun 5, 2015
|
It's So it's not quite the same thing. :P |
This comment has been minimized.
This comment has been minimized.
rsolomo
commented
Jul 9, 2015
|
I've taken a pass at creating a |
This comment has been minimized.
This comment has been minimized.
narfanar
commented
Jul 10, 2015
|
Would an integrated |
This comment has been minimized.
This comment has been minimized.
MarkSwanson
commented
Aug 26, 2015
|
$ cargo rustc -- -Z no-trans (cargo-check has the same problem) In my Cargo.toml I have: [lib] I'd like them both to be compiled with -Zno-trans (remove the restriction of a single target). Reason: I do not want to manually type different commands to compile everything with -Zno-trans; it's just too much work. In vim I'd just like to ":mak" - which works fine until I add -Zno-trans :-( Thanks! |
This comment has been minimized.
This comment has been minimized.
|
This now exists! It should also be quite easy to install via |
alexcrichton
closed this
Nov 11, 2015
This comment has been minimized.
This comment has been minimized.
Valloric
commented
Nov 29, 2015
|
Why does the user have to install it separately? It's neither easily discoverable nor friendly to newbies. |
This comment has been minimized.
This comment has been minimized.
arthurprs
commented
Nov 29, 2015
|
@Valloric I share the opinion. Even when incremental compilation lands llvm will probably always take a big chunk of compilation time, so I see no reason not to incorporate this feature in cargo itself. |
This comment has been minimized.
This comment has been minimized.
Valloric
commented
Nov 29, 2015
|
@arthurprs Exactly! This is a trivial command to add and cargo should have it by default so that it shows up in It would lead to a massive quality-of-life improvement for everyday Rust development. It's such an easy, low-cost win that I can't fathom why the core devs aren't falling over themselves to implement it. |
This comment has been minimized.
This comment has been minimized.
|
@Valloric I've opened #2187 on the discovery aspect of subcommands, but I agree that there's a general sentiment that a subcommand such as this should be in Unfortunately there's no stabilization route for Cargo itself like there is for Rust, so all new additions are instantly stable. This means that we need to be extra careful before adding new features, and it's intended that subcommands can serve as both a breeding and testing ground for movement into Cargo itself. |
This comment has been minimized.
This comment has been minimized.
Valloric
commented
Dec 1, 2015
Excellent point. I agree that the subcommands should first exist as separate binaries like Though I'd argue that a built-in
This way there's room for future extension and the subcommand is not bound by the (sub) set of checks currently performed. |
This comment has been minimized.
This comment has been minimized.
|
Yeah that was basically our thinking as well. I suspect that it will be one of the first subcommands to be moved into Cargo. Also yes, it won't be documented as using |
This comment has been minimized.
This comment has been minimized.
Valloric
commented
Dec 5, 2015
|
Sounds great. Thanks for being open about this! |
This comment has been minimized.
This comment has been minimized.
Valloric
commented
Dec 13, 2015
|
To provide some data on the need for a built-in |
This comment has been minimized.
This comment has been minimized.
calebmer
commented
Feb 25, 2016
|
Having |
bruno-medeiros
referenced this issue
Mar 18, 2016
Closed
Build subcommand or option that builds all targets (including tests) #2495
This comment has been minimized.
This comment has been minimized.
bruno-medeiros
commented
Mar 18, 2016
|
The check command as in https://github.com/rsolomo/cargo-check has severe limitations: you have to build a specific Cargo target each time (rsolomo/cargo-check#4), which is very problematic, especially with regards to the tests targets. I want a Cargo command that checks everything in my crate, this is what you'd expect to be the default behavior. (see also: #2495) |
This comment has been minimized.
This comment has been minimized.
bruno-medeiros
commented
Mar 18, 2016
I agree. I want to add this functionality to https://github.com/RustDT/RustDT, and it's the same story, more convenient if it's bundled with Rust. Also https://github.com/rsolomo/cargo-check has the limitations I mentioned above, which means changes to Cargo itself might be required if those limitations are to be addressed.
Shouldn't there be a stabilization route for Cargo then, if it's causing so much trouble? In terms of making suggestions to improve IDE interaction, I've barely got started doing Cargo feedback, but already the stabilization issue of the Cargo interface is making progress very difficult (the deterministic filenames for test targets is another example of that - a change that otherwise would be trivial). |
azerupi
referenced this issue
May 6, 2016
Closed
Allow `cargo rustc -- ...` for crates with both libs and binaries without needing to "filter" #2642
bruno-medeiros
referenced this issue
May 12, 2016
Open
TRACKER for important Rust and Cargo toolchain issues #112
This comment has been minimized.
This comment has been minimized.
bruno-medeiros
commented
May 12, 2016
@alexcrichton If you agree with that, can a new issue be created so that we track it? (Or re-open this one if you prefer) |
This comment has been minimized.
This comment has been minimized.
|
Ok |
alexcrichton
reopened this
May 12, 2016
This comment has been minimized.
This comment has been minimized.
|
Another vote for built-in cargo check support from me - would greatly improve the RLS/IDE experience. A problem we currently have (and I'm not sure if the external check solves this or not) is that if a dependent crate is a macro crate, then |
This comment has been minimized.
This comment has been minimized.
|
Closed by #3296 |
This comment has been minimized.
This comment has been minimized.
|
Yay! |
tomjakubowski commentedFeb 15, 2015
During the edit-compile cycle it's often annoying to have to wait for trans to finish before moving on to the next edits. I propose a new subcommand,
cargo check, that runs only the parsing, expansion, and checking/analysis phases where possible when building the project.The implementation would be just like
cargo build, but passing--no-transtorustcwhen building the leaves of the crate dependency graph. A--liboption, like oncargo build, would only build the project's lib target if it has one.