Closed Bug 1794693 Opened 2 years ago Closed 2 years ago

Convert devtools-source-map debugger package into regular devtools commonjs modules, and vendor source-map npm package more explicitly

Categories

(DevTools :: Debugger, enhancement)

enhancement

Tracking

(firefox108 fixed)

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The debugger host an inline npm "devtools-source-map" package:
https://searchfox.org/mozilla-central/source/devtools/client/debugger/packages/devtools-source-map

It introduces lots of complexify because:

The plan here would be to:

  • migrate devtools-source-map to devtools/client/shared/source-map
  • stop generating any bundle code
  • load the modules of this folder as-is. It means using a naive commonjs loader from the worker thread. https://searchfox.org/mozilla-central/source/toolkit/components/workerloader/require.js
  • vendor explicitly md5, whatwg-url and source-map package in devtools/client/shared/vendor/ (bug 1794692)
  • migrate jest tests to mochitest
  • followup cleanup as this code is now gecko/mozilla-central only (i.e. no longer need to support node)

This used to be a node package. Let's make it become regular commonjs devtools modules.
This will make it trivial to migrate this to ES Modules.
Also possibly make this code become the unique layer in m-c on top of the source-map package.

We no longer use webpack to build the two bundles (index.js and worker.js),
instead, we are using the toolkit worker loader (require.js) in order to load
all this code without any build step.

As this is no longer a node package, I removed node-specific modules (assertRoot/wasmAsset)
and simplify the definition of wasm file URIs as they are now fixed.

Also moving the debugger to load internal "devtools/client/shared/source-map/source-map.js"
module in jest as running the Web Worker instantiated by source-map/index.js is too complex.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Blocks: 1797690
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a14bff20eae [devtools] Move devtools-source-map to regular mozilla-central code. r=bomsy,perftest-reviewers,jdescottes,sparky https://hg.mozilla.org/integration/autoland/rev/0c0dc33dbc88 [devtools] Convert source-map jest test into mochitests. r=bomsy
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
Regressions: 1822334
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: