4 ms·
> I had a 10 second compilation cycle to add a comment to a file in a project with a couple hundred lines of code and like 4 lines in my cargo.toml. Why compil
by _-___________-_ 6y ago
> I had a 10 second compilation cycle to add a comment to a file in a project with a couple hundred lines of code and like 4 lines in my cargo.toml.
Why compile again after adding a comment?
- bluecmd 6y agoBuild systems usually don't care what you added. Modification of source means rebuild.
- _-___________-_ 6y agoYes, but the programmer knows what they added, and I was asking why they wanted to build again if all they added was a comment? If this was in a CI context then 10 seconds seems unimportant; compile times of 10 seconds are usually only complained about in the context of programmers who've gotten used to tiny edit-compile-test cycles.
- entha_saava 6y agoIn order to ensure the next rebuild on an actual code change doesn't need to compile this comment-changed file, I guess.
- im3w1l 6y agoIn fast-compiling languages, it's viable to have recompile-on-file-save or even continuous recompilation. Modern (and they aren't that modern anymore) IDE's will show red squiggles under code with compilation errors without requiring any action at all.
- mlindner 6y agoThat's already provided by other tools than the compiler like rust analyzer.
- johnfn 6y agoThis was meant as an example, not something I'd literally do. The most common trivial change would be to add a dbg! statement.