Summary
We need to use NodeJS-based tools to make Chrome Material Design Settings fast enough to ship. More details in the document (also linked below).
Tracking bug
Hello Chromium developers and Node users,Summary
We need to use NodeJS-based tools to make Chrome Material Design Settings fast enough to ship. More details in the document (also linked below).
Tracking bug
ContactsThoughts?-- Demetrios & Dan
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
These are good questions.The JS community has very strongly shifted to using tools based on top of Node to do things like lint, minify, combine modules, and run tests.Attempting to stub those out or duplicate the functionality in a different language like Python at this point would IMO both be a bunch of workthat is unnecessary and very much swimming upstream. A few years ago when we first discussed adding Node I also thought it might betractable to avoid it and re-implement the work in Python and avoid the 100's of KLOCs of code that doing anything in Node appears to require.I no longer really think that's the case. Or, at least, I'm not going to be the one putting in the work, and no one else seems to want to , either.
> To be clear, no part of Polymer depends on Node.Well, if you don't need to use Node but "We need to use NodeJS-based tools to make Chrome Material Design Settings fast enough to ship", then you kinda need to use Node ;-)On Mon, Dec 19, 2016 at 1:46 PM, Dirk Pranke <dpr...@chromium.org> wrote:These are good questions.The JS community has very strongly shifted to using tools based on top of Node to do things like lint, minify, combine modules, and run tests.Attempting to stub those out or duplicate the functionality in a different language like Python at this point would IMO both be a bunch of workthat is unnecessary and very much swimming upstream. A few years ago when we first discussed adding Node I also thought it might betractable to avoid it and re-implement the work in Python and avoid the 100's of KLOCs of code that doing anything in Node appears to require.I no longer really think that's the case. Or, at least, I'm not going to be the one putting in the work, and no one else seems to want to , either.I mean we already have a JS engine, it only isn't able to write files and things, which is what Node provides bindings for. I meant to suggest to stub out those pieces -- most of Polymer is probably/hopefully/maybe "just" JS which we already can run.
( Trimming the cc' list because there are a couple of incorrect addresses and because we're all on chromium-dev anyway ... )I expect the node modules and other stuff that closure_compiler and karma pull in will also be pulled in as binary dependencies.So, they'll impose a one-time cost in download time and disk space on the initial pull (or again when they're updated), but will notimpose costs on each build.I believe the costs are not excessive (a few MB to maybe 10s of MB), but maybe I'm wrong. If so, that would be good to know.This is still probably significantly better than, say, the NaCl toolchains :).
> email to chromium-dev+unsubscribe@chromium.org.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/H2IqgqwdUqs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev+unsubscribe@chromium.org.
I remain skeptical that having two dependencies on v8 (on because we depend on v8, and one through node) is the best way forward here. We already have a JS engine in chromium's repo.
What parts of node does Polymer need? Is it hard to stub those out ourselves?
Why did we add a strong dependency on Polymer when the integration story there is apparently still "Node"?
> To be clear, no part of Polymer depends on Node.Well, if you don't need to use Node but "We need to use NodeJS-based tools to make Chrome Material Design Settings fast enough to ship", then you kinda need to use Node ;-)On Mon, Dec 19, 2016 at 1:46 PM, Dirk Pranke <dpr...@chromium.org> wrote:These are good questions.The JS community has very strongly shifted to using tools based on top of Node to do things like lint, minify, combine modules, and run tests.Attempting to stub those out or duplicate the functionality in a different language like Python at this point would IMO both be a bunch of workthat is unnecessary and very much swimming upstream. A few years ago when we first discussed adding Node I also thought it might betractable to avoid it and re-implement the work in Python and avoid the 100's of KLOCs of code that doing anything in Node appears to require.I no longer really think that's the case. Or, at least, I'm not going to be the one putting in the work, and no one else seems to want to , either.I mean we already have a JS engine, it only isn't able to write files and things, which is what Node provides bindings for. I meant to suggest to stub out those pieces -- most of Polymer is probably/hopefully/maybe "just" JS which we already can run.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
I remain skeptical that having two dependencies on v8 (on because we depend on v8, and one through node) is the best way forward here. We already have a JS engine in chromium's repo. What parts of node does Polymer need? Is it hard to stub those out ourselves?
Why did we add a strong dependency on Polymer when the integration story there is apparently still "Node"?
On Mon, Dec 19, 2016 at 3:22 PM, Dirk Pranke <dpr...@chromium.org> wrote:( Trimming the cc' list because there are a couple of incorrect addresses and because we're all on chromium-dev anyway ... )I expect the node modules and other stuff that closure_compiler and karma pull in will also be pulled in as binary dependencies.So, they'll impose a one-time cost in download time and disk space on the initial pull (or again when they're updated), but will notimpose costs on each build.I believe the costs are not excessive (a few MB to maybe 10s of MB), but maybe I'm wrong. If so, that would be good to know.This is still probably significantly better than, say, the NaCl toolchains :).That seems like a pretty bad point of reference, almost everything looks small compared to those :-PInitially, the idea was that WebUI could depend on a modern browser, so that it could be "just JS" and we wouldn't need jquery or whatever the big web thing was back then.
Now that transpiling JS is popular on the web, it sounds like we're close committing to depending on:* Node* Closure-compiler-in-js-compiled-through-gwt(?)-from-Java* Etc
To me, that looks like one of the biggest dependencies (or rather, dependency chains) we've added so far. Hence, I'd personally love to see a larger "other evaluated approaches" and their drawbacks section in that doc.
On Mon, Dec 19, 2016 at 12:45 PM, Nico Weber <tha...@chromium.org> wrote:On Mon, Dec 19, 2016 at 3:22 PM, Dirk Pranke <dpr...@chromium.org> wrote:( Trimming the cc' list because there are a couple of incorrect addresses and because we're all on chromium-dev anyway ... )I expect the node modules and other stuff that closure_compiler and karma pull in will also be pulled in as binary dependencies.So, they'll impose a one-time cost in download time and disk space on the initial pull (or again when they're updated), but will notimpose costs on each build.I believe the costs are not excessive (a few MB to maybe 10s of MB), but maybe I'm wrong. If so, that would be good to know.This is still probably significantly better than, say, the NaCl toolchains :).That seems like a pretty bad point of reference, almost everything looks small compared to those :-PInitially, the idea was that WebUI could depend on a modern browser, so that it could be "just JS" and we wouldn't need jquery or whatever the big web thing was back then.Most of WebUI runs on HEAD Chrome + blink + v8. But parts run on Chrome for iOS, which differs in its support.Now that transpiling JS is popular on the web, it sounds like we're close committing to depending on:* Node* Closure-compiler-in-js-compiled-through-gwt(?)-from-Java* EtcWe don't yet transpile. We could if we'd like to make sure we don't break iOS users. Right now we basically check manually (and I added a presubmit about 1 specific feature (=>) recently).Also, we don't yet need Closure-thinger-from-GWT; we currently use uglifyjs (an alternative approach). This saved like 300KB from Chrome's installer. But uglifyjs' support of ES6 features is still behind a branch, and we'd prefer to use Closure compiler because it has great ES6 support and is Google-maintained (and may produce more optimized code).To me, that looks like one of the biggest dependencies (or rather, dependency chains) we've added so far. Hence, I'd personally love to see a larger "other evaluated approaches" and their drawbacks section in that doc.
FWIW this proposal sounds reasonable given all the constraints listed.One thing I didn't see is: what's the effect on build times?
On Mon, Dec 19, 2016 at 5:37 PM, John Abd-El-Malek <j...@chromium.org> wrote:FWIW this proposal sounds reasonable given all the constraints listed.One thing I didn't see is: what's the effect on build times?The additional build time for creating JS/HTML bundles takes:
- 5.5 seconds (averaged) for Downloads
- 10-12 seconds (averaged) for Settings
If "use_vulcanize = false" is used, then there is no impact at all in build times. Needless to say that things only get rebuild if a dependency of the output HTML/JS changes, so it would have a minimal impact on developers who don't modify given WebUI pages. I can send more instructions if you want to try it locally (it involves patching 4 CLs).
Can you provide numbers for all the webui pages on mac/win/linux? How many webui pages would go through this at the end (I presume all of them?). If so, what's the upper range for this new build step?
I am mostly neutral about NodeJS. However, I've found it necessary to modify WebUI sometimes in the past, and historically, it's not been so easy for me to figure what JS file to modify. Will throwing the NodeJS toolchain in the mix make this easier or harder? =)
Thanks. So how many pages in total will this run on once everything is using MD?
Additional build time by the new compilation steps is a concern (especially when more WebUI pages will be vulcanized).
Thanks for the update, that sounds right to me.Do you know if this tooling produces deterministic outputs? As in, if I run the build step, delete the outputs, and run it again, does it produce exactly the same files again?
Do we audit every change to clang or gcc or <insert build tool here> for non-determinism? Addressing issues as they come up sounds like a lot less effort.
-- Dirk