build
build copied to clipboard
Add module size "lint"
If a module is greater than some threshold size, give users a "hint" that they should consider breaking it up – ideally by pointing to documentation
I like this one! I'd also love more docs on what a module is, how it effects compilation time, etc.
On Tue, Mar 6, 2018, 8:05 AM Kevin Moore [email protected] wrote:
If a module is greater than some threshold size, give users a "hint" that they should consider breaking it up – ideally by pointing to documentation
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dart-lang/build/issues/1102, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKQ7pTMvfP-WCpFJIR_hF9i2vlkFG36ks5tbrPWgaJpZM4Se-PM .
Should we do this only for the root package or for other packages as well?
All the things!
Some ideas:
-
--[no]-module-checks
: Enable/disable checking modules for potential problems. -
--module-check-deps
: If--module-checks
is enabled, also check dependencies.
Ideally we wouldn't be checking dependencies by default, because (a) that seems wasteful and (b) often the user won't have the option to change it [at least not easily] anyway. I could see it being useful for diagnostics.
Other option is simply have a diagnostics/doctor-like mode instead, i.e.:
$ pub run build_runner build --diagnose-problems
... where it cleans, builds, and potentially even builds again to check caching?
Other option is simply have a diagnostics/doctor-like mode instead
I do like the idea of a special command for this.
Doctor mode is fine, too – instead of adding 3 more special-purpose flags. Sure...
On Tue, Mar 6, 2018 at 1:19 PM, Nate Bosch [email protected] wrote:
Other option is simply have a diagnostics/doctor-like mode instead
I do like the idea of a special command for this.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dart-lang/build/issues/1102#issuecomment-370931878, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCitE3_WIJSMf-DkMLaNIBXlfPkoasks5tbv1SgaJpZM4Se-PM .
Concrete issue we should try to prevent: https://github.com/dart-lang/webdev/issues/170
I believe that the implementation of this warning could help solve this issue too: https://github.com/dart-lang/webdev/issues/436, considering this discussion: https://github.com/dart-lang/webdev/issues/170
@supermuka - the CPU issue appears related to file watching which is orthogonal to module sizes.