[WIP] Transpile debugger modules for DevTools loader #6220
Conversation
could we just do |
3fb717a
to
b19b45b
|
Applied Jason's suggestion for Callsite.css. |
| ModuleDeclaration(path, state) { | ||
| const source = path.node.source; | ||
| const value = source && source.value; | ||
| if (value && value.includes(".css")) { |
| @@ -0,0 +1,30 @@ | |||
| /* This Source Code Form is subject to the terms of the Mozilla Public | |||
juliandescottes
May 4, 2018
Author
Member
@jasonLaster I put this under the root right now, maybe we should have a firefox-integration folder or something?
@jasonLaster I put this under the root right now, maybe we should have a firefox-integration folder or something?
| if (isDevelopment()) { | ||
| // In local development, use the debugger as a single bundle | ||
| webpackConfig.entry.debugger = getEntry("src/main.js"); | ||
| } else { |
juliandescottes
May 4, 2018
Author
Member
@jasonLaster When we are not in development, we no longer build the debugger bundle, but we still build other bundles. Maybe we can simplify some things here?
@jasonLaster When we are not in development, we no longer build the debugger bundle, but we still build other bundles. Maybe we can simplify some things here?
|
The DebuggerConfig issue should be resolved by #6223, so marking this one as resolved. Still mochitests to fix now! |
|
Totally forgot I had to whitelist a few duplicate items: https://hg.mozilla.org/try/comparison/9b6fdd663985/browser/installer/allowed-dupes.mn They are all types! And all simply contain "use strict". We should probably not transpile/copy/package them! |
|
There is also a new dupe for the chevron:
|
b19b45b
to
c85cb06
|
Mochitests should now be fixed: the issue was with build-query.js where I earlier changed:
This worked well when the file is used in the context of the debugger, but it is also used in a worker. In this case, First comment, we probably should not use the mc-mappings when bundling workers, they won't be able to require them anyway. And second comment, since those workers will need to pull and bundle everything we should be careful not to bundle huge libraries with them. The solution here is to handle the special case of "lodash/subModule" requires in our babel plugin. |
|
Hmmmpf I rebased this on release 46 in order to make sure to have a clean baseline for tests, which is making the whole PR unreadable |
cc264c5
to
ee4551f
|
Excluded types from copy modules. |
|
Here is a try run with the latest version, this one should hopefully be green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3b39504b755ddb7eacb2282ad9fc0091217a9ea8 Edit: Yay! Green try! |
ee4551f
to
698e632
|
The travis build is failing right now because it can't see the files transferred via copy modules. This is most likely because we need to build again after |
|
All my TODOs are addressed, we have a green try, a green travis. We can move to the review step! |
|
This looks great! 2 things:
|
|
also - one other thing that might be a nice follow up, but I've been thinking about the directory structure and i think this might be more future forward:
the benefits are:
I think we could get this directory structure by tweaking copy-assets and copy-modules. Again, we could do this as a second step... |
- generate vendors.js only when isDevelopment() is false - generate debugger.js only when isDevelopment() is true - standardize vendors.js and add comments - add temporary workarounds to enable transpiled version to work
175664b
to
820daf1
|
Rebased + moved mozilla-central-mappings.
We actually have
This sounds like a good step. I'll try to fit it in here. |
| const mcDebuggerPath = path.join(mcPath, "devtools/client/debugger/new"); | ||
|
|
||
| console.log("[copy-modules] copying files to: " + mcDebuggerPath); | ||
| shell.cp("-r", "./out/src", mcDebuggerPath); |
jasonLaster
May 7, 2018
Contributor
it would be nice to rm ./out when we're done.
it would be nice to rm ./out when we're done.
| ModuleDeclaration(path, state) { | ||
| const source = path.node.source; | ||
| const value = source && source.value; | ||
| if (value && value.includes(".css")) { |
jasonLaster
May 7, 2018
Contributor
we need to remove the CSS imports e.g. import "CallSite.css"
we need to remove the CSS imports e.g. import "CallSite.css"
This reverts commit 4ce2953.
This is a work in progress PR, intended for collaboration and discussion, do not merge!
cc @jasonLaster @ochameau
I started doing some cleanup, and rebased on latest master.
In my opinion, TODOs:
window.DebuggerConfigin debugger's index