Use JSX for App component
Categories
(DevTools :: Netmonitor, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: Honza, Unassigned)
References
(Depends on 2 open bugs)
Details
Attachments
(2 files, 1 obsolete file)
793.49 KB,
patch
|
Details | Diff | Splinter Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Reporter | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Reporter | ||
Comment 4•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Reporter | ||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Sorry David if yesterday meeting felt a bit harsh. Communication around the node build step wasn't clear.
I wasn't aware of this Outreachy JSX project at all, nor that we were actively trying to expand the node build step to other tools.
Your patch looks pretty good, I'll submit some suggestion on phabricator but I'm really happy to see you being able to hack this totally undocument and very cryptic moz.build bits and apply it to netmonitor :)
Unfortunately, the node build step doesn't scale because of:
- performance reasons,
- generated code downsides.
Performance issue
I did my best in the original bug introducing the node build step to be the most efficient.
But, we are still running node and the build script once per folder. We were about to do it once per file, so it is already better than worse. Executing node process and evaluating babel is taking a significant time and introduces a significant overhead if you do it many times. And the issue is that this build step is mandatory for anyone building firefox, not only DevTools contributors. So when you are slowing this down, you are making a significant part of the company slower.
For the debugger, we moved forward with such performance bottleneck as we were looking forward being able to build debugger from m-c and unlock all the initiatives to move from Github to mozilla-central (smoother debugger releases, being able to contribute from m-c, ...).
Here for netmonitor, the situation is different as that's only for JSX.
This is less critical than being able to build the debugger from m-c.
Generated code
This issue did not applied to the debugger as the code was already generated anyway.
But here, we start introducing differences between sources and runtime in a new codebase which wasn't having this issue.
We are still missing tooling like source-map for mozilla-central codebase in order to have original lines/columns.
For example, stack traces reported by users on bugzilla would be harder to interpret. Same thing for stack traces on test failures, ...
This is a pretty challenging thing to address as we have to:
- ensure that we do generate source-maps,
- ensure that all the places where we display stack traces are taking source map into account. It isn't clear if test failures are logging test failures with original locations.
This issue of generated code isn't so much about the patch you wrote, but more about the goal behind it.
Overall I think we ought to improve this nodejs build trick if we want to spread it over devtools:
- improve the build speed,
- demonstrate that we can have source-maps for the debugger and ensure original location are displayed in important locations,
- review what I just copied from debugger repo (babel.js, copy-module.js). Bastien comment is a good example of that. We should probably try to land the unminified sources. Or at very least document how we generated this file in order to be able to reproduce it and verify we have the same output.
- improve the log output of ./mach build. It is currently quite cryptic today with all these "node.stub". But this is more a nice to have.
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Backed out changeset 7f51bc3757d9 (Bug 1497839) for ESlint failure at build-debugger.js.
Backout: https://hg.mozilla.org/integration/autoland/rev/09dd6c2c111962afd8ef36a50184b4b3fa740c7e
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=7f51bc3757d9d196730d75d719199b29c21fbe0b&selectedJob=232064836
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=232064836&repo=autoland&lineNumber=279
Comment 11•6 years ago
|
||
This reverts commit 2b1fea9435191242f8aadc04da3ed1b0e0d99b02.
Bug 1497839 - fix eslint issues for babel build. r=jlast
Updated•6 years ago
|
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
(it would be great if you could keep the history of node-templates.mozbuild file [by using hg mv or something])
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Description
•