Convert httpd.js to an ES module.
Categories
(Core :: Networking, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
(Whiteboard: [esmification-timeline][necko-triaged])
Attachments
(2 files)
Assignee | ||
Comment 1•2 years ago
|
||
As part of the ongoing work, we should convert httpd.js to an ES module.
This is a bit more involved than some of the other conversions, since it is currently loaded both as an ES module and as a normal JavaScript file. However, I think we can make it so that it only needs to be loaded as an ES module.
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
I have a set of patches for this which I think will work. The plan is roughly: 1) get reviews, 2) get hostutils updated for android, 3) test everything on try, 4) land it.
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D181157
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D181158
Comment 6•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ed0e12cfcb8a
https://hg.mozilla.org/mozilla-central/rev/345a6cc4c490
Comment 7•2 years ago
|
||
Thanks for converting the ES module and all the updates! I think something might not be importing fully for Android or else I could be needing to update something.
I get this error when starting to run the geckoview-junit
test suite via ./mach geckoview-junit
on an M2 Mac after this change:
JavaScript error: /Users/olivia/Repos/gecko/obj-aarch64-unknown-linux-android/_tests/testing/mochitest/server.js, line 25: Error: Failed to load resource://httpd-server/httpd.sys.mjs
(Tests run as expected if launched via Android Studio currently or if I revert this bug's commit back to using httpd.js
and then run using ./mach geckoview-junit
.)
Assignee | ||
Comment 8•2 years ago
|
||
(In reply to Olivia Hall [:olivia] from comment #7)
I get this error when starting to run the
geckoview-junit
test suite via./mach geckoview-junit
on an M2 Mac after this change:
JavaScript error: /Users/olivia/Repos/gecko/obj-aarch64-unknown-linux-android/_tests/testing/mochitest/server.js, line 25: Error: Failed to load resource://httpd-server/httpd.sys.mjs
You might need an updated hostutils which is happening in bug 1839504. You may be able to copy the files across for the time being, but I don't know what the correct destinations would be.
Comment 9•2 years ago
•
|
||
(In reply to Mark Banner (:standard8) (afk until 24th July) from comment #8)
(In reply to Olivia Hall [:olivia] from comment #7)
I get this error when starting to run the
geckoview-junit
test suite via./mach geckoview-junit
on an M2 Mac after this change:
JavaScript error: /Users/olivia/Repos/gecko/obj-aarch64-unknown-linux-android/_tests/testing/mochitest/server.js, line 25: Error: Failed to load resource://httpd-server/httpd.sys.mjs
You might need an updated hostutils which is happening in bug 1839504. You may be able to copy the files across for the time being, but I don't know what the correct destinations would be.
So to get out of this situation, looks like you need to:
- get rid of
$HOME/.mozbuild/android-device/
- clobber
- re-run
mach bootstrap
- re-run
mach install
- re-run your
mach mochitest
This was the only flow that worked to update hostutils
for me. It would be redownloaded as part of mach mochitest
, so I'm a bit troubled why it has not detected I had a stale version and performed an update.
$ BUILD_ANDROID=1 BUILD_DEBUG=1 ./mach mochitest ipc/glue/test/browser/test_utility_audio_on.html
Host utilities not found: environment variable MOZ_HOST_BIN is not set to a directory containing host xpcshell
Download and setup your host utilities? (Y/n) y
Installing host utilities...
INFO - Attempting to fetch from 'https://tooltool.mozilla-releng.net/'...
INFO - File host-utils-116.0a1.en-US.linux-x86_64.tar.gz fetched from https://tooltool.mozilla-releng.net/ as /home/alexandre/.mozbuild/android-device/tmp20npb8km
INFO - File integrity verified, renaming tmp20npb8km to host-utils-116.0a1.en-US.linux-x86_64.tar.gz
INFO - untarring "host-utils-116.0a1.en-US.linux-x86_64.tar.gz"
Test configuration changed. Regenerating backend.
Description
•