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 upNote build profile in `cargo build` output #1309
Comments
This comment has been minimized.
This comment has been minimized.
|
From @Valloric on this thread, yet another story of a user not knowing about optimizations and the |
This comment has been minimized.
This comment has been minimized.
|
I'd like to add a suggestion that this nag message could be disabled via a Cargo config flag. Also, it isn't necessarily true that the release profile is optimized and the debug profile is not, so Cargo should probably check these things before printing those messages. |
This comment has been minimized.
This comment has been minimized.
|
I do agree that this does seem like a problem, but I really do worry about non-newbie users. As soon as you know the difference you never want to see this message again, and I suspect that all Rust programmers will eventually know the difference. This means that if configuration is required it will mean that all Rust programmers will want that configuration. This indicates to me that it may be the wrong default. It's definitely a tricky problem figuring out the best way to show this, but I just wanted to lay out some of my own personal worries. |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton I'm not sure I understand why it would be an issue. It's a one-line message that should only show up when the "Compiling foo..." notice would appear anyway. Even for non-newbie users it would be useful as a configuration check like "whoops, I forgot to pass --release that time". I would definitely agree more if |
This comment has been minimized.
This comment has been minimized.
|
In general, I tend to prefer the Unixism of 'dont print anything unless it's unexpected'. We don't exactly keep to that in Cargo, but there's a number of these kinds of suggestions to keep adding things to the output. |
This comment has been minimized.
This comment has been minimized.
|
@steveklabnik If Cargo did that, then all of the current notices about compiling, downloading dependencies, etc. would not be printed either. |
This comment has been minimized.
This comment has been minimized.
|
I know. |
This comment has been minimized.
This comment has been minimized.
|
I don't know of any build systems off the top of my head that are completely silent by default. |
tanadeau
referenced this issue
Feb 26, 2015
Closed
Make `--release` default (at least for dependencies) #784
This comment has been minimized.
This comment has been minimized.
|
I wouldn't like extra "educational" lines in the output (they get boring quickly), but perhaps the existing "Compiling…" line could be changed accordingly from:
To something like:
|
This comment has been minimized.
This comment has been minimized.
Ryman
commented
Feb 27, 2015
|
For |
alexcrichton
added a commit
to alexcrichton/cargo
that referenced
this issue
Mar 3, 2015
alexcrichton
referenced this issue
Mar 3, 2015
Closed
Note the build profile in output by default #1374
alexcrichton
added a commit
to alexcrichton/cargo
that referenced
this issue
Mar 4, 2015
This comment has been minimized.
This comment has been minimized.
|
Having the debug/release folders has ended up meaning that I haven't seen this in quite some time, so I'm going to close this for now as the debug/release folder seems to be sufficient. |
alexcrichton
closed this
Nov 11, 2015
This comment has been minimized.
This comment has been minimized.
Valloric
commented
Nov 29, 2015
|
Running a "debug" binary provides zero indication to developers coming from Ruby, Python, Java, JavaScript, C# or the other languages that together make up 90% of all modern development that the binary is vastly slower than a release build. We've been over this many, many times now. Dozens of people have pointed this out in discourse threads, RFC comments, r/rust discussions etc. "Debug" is not enough. There needs to be something telling these users that an unoptimized build is being produced/run. Running a binary from a folder named "debug" does not convey this information. |
tanadeau commentedFeb 14, 2015
Currently the output of the
cargo buildcommand does not reference the build profile (debug/default or release) anywhere in its output. This creates two issues:I propose that the output of
cargo buildand similar "building" commands go from:to
and