Cleanup devtools webpack shims

RESOLVED FIXED in Firefox 58

Status

enhancement
P3
normal
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: jdescottes, Assigned: jdescottes)

Tracking

unspecified
Firefox 58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(2 attachments)

The goal of this bug is to gather all the shims currently used by launchpad consumers in mozilla-central (console, netmonitor & inspector).

The shims should all be in the same location in m-c to avoid duplication & confusion. 

We can also discuss whether some shims should be move to launchpad or not.
Here is the list of shims we use from m-c:
- "devtools/client/webconsole/jsterm": devtools/client/local-dev/jsterm-stub.js
- "devtools/client/webconsole/utils": devtools/client/new-console-output/test/fixtures/WebConsoleUtils.js
- "devtools/client/framework/devtools": devtools/client/shims/devtools.js
- "devtools/shared/system": devtools/client/local-dev/system-stub.js
- "devtools/shared/fronts/timeline": devtools/shared/shims/fronts/timeline.js
- "devtools/shared/platform/clipboard": devtools/shared/platform/content/clipboard.js
- "devtools/shared/platform/stack": devtools/shared/platform/content/stack.js

Which means our shims are found in 5 folders:
- devtools/client/local-dev/
- devtools/client/new-console-output/test/fixtures/
- devtools/client/shims/
- devtools/shared/shims/
- devtools/shared/platform/content/

I think we should move them all to devtools/shared/webpack/shims. I will leave out devtools/shared/platform/content/ for which the situation is a bit more a complex. I logged Bug 1403489 to address this.
Comment on attachment 8912628 [details]
Bug 1403175 - webpack: simplify netmonitor & console aliases;

https://reviewboard.mozilla.org/r/183952/#review189120

just tested the console and it works well.
Thanks Julian

::: devtools/client/netmonitor/webpack.config.js:100
(Diff revision 1)
>        "devtools/shim/locales": path.join(__dirname, "../../shared/locales/en-US"),
>        "toolkit/locales": path.join(__dirname, "../../../toolkit/locales/en-US"),
> +
> +      // Unless a path explicitly needs to be rewritten or shimmed, all devtools paths can
> +      // be mapped to ../../
> +      "devtools": path.join(__dirname, "../../"),

great !
Attachment #8912628 - Flags: review?(nchevobbe) → review+
Thanks for the review Nicolas! 

Note that this patch makes the first patch attached to Bug 1403106 redundant, so feel free to block your bug on mine to avoid conflicts :)
See Also: → 1403106
Comment on attachment 8912628 [details]
Bug 1403175 - webpack: simplify netmonitor & console aliases;

https://reviewboard.mozilla.org/r/183952/#review189174

Excellent, thanks!

Net monitor tested with the Launchpad and works as expected.

R+

Honza
Attachment #8912628 - Flags: review?(odvarko) → review+
Comment on attachment 8912629 [details]
Bug 1403175 - move webpack shims to dedicated folder;

https://reviewboard.mozilla.org/r/183954/#review189176

LGTM!

Honza
Attachment #8912629 - Flags: review?(odvarko) → review+
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4362432d8d32
webpack: simplify netmonitor & console aliases;r=Honza,nchevobbe
https://hg.mozilla.org/integration/autoland/rev/925bee759927
move webpack shims to dedicated folder;r=Honza
Thanks for the reviews! Landing
https://hg.mozilla.org/mozilla-central/rev/4362432d8d32
https://hg.mozilla.org/mozilla-central/rev/925bee759927
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.