Devs should never be checking in code that results in a compilation error. Regardless of whether something needs generating.
Also there’s a difference between an entire companies code in one VCS and a product with many modules.
I’ve had experience with the latter and can tell you some of the pro’s:
1. A single version for your product. This helps communications with QA, clients and managers. And communication is the game we are in whether we like it or not
2. Reduced friction in developing features that cut across modules. Lets say I need to add a column to a database and then expose in the Ui. update the sql, added the field in a webservice, make the necessary adjustments in the UI, write the tests all on the same commit.
3. Increased collaboration. Quite often invisible lines are drawn on development teams where devs are feel they are unable to modify a module because they didn’t write it, they don’t understand it or they just feel that its not a part of their job. With everything in one repo this reduces the barrier to entry
Its not a free lunch though. Like you mention build times go up For one.
I’m a jvm dev and I find gradle extremely useful in this regard. Features like Muti project builds and concurrent builds are invaluable