Make getEngineByAlias async
Categories
(Firefox :: Search, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: daleharvey, Assigned: kanishk509, Mentored)
Details
(Keywords: good-first-bug, Whiteboard: [lang=js])
Attachments
(1 file)
General refactoring, lets make these async to avoid problems with the sync init flow
Comment 1•5 years ago
|
||
I'm willing to mentor this. Here's a few hints:
- You'll need a full build rather than just an artifact build.
- The list of references to getEngineByAlias can be found here (ignore the generated code section).
- We want to make getEngineByAlias async - In the idl file, the return value needs changing to a
Promise
. - The definition in SearchService.jsm should change to be
async
and callawait this.init();
rather thanthis._ensureInitialized()
. - The callers in the various files need to be updated to use
await
. Also look out for the optimisation in UrlbarUtils.jsm. - To run the newtab tests:
$ cd browser/components/newtab/
$ npm install
$ npm run test
Comment 2•5 years ago
|
||
I would like to have a look at this bug
Comment 3•5 years ago
|
||
Hi, please feel free to start working on it. I'll assign you now as it's a little larger than some patches. If you decide to stop working on it for any reason, please let us know so we can pass it on.
Comment 4•5 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #3)
Hi, please feel free to start working on it. I'll assign you now as it's a little larger than some patches. If you decide to stop working on it for any reason, please let us know so we can pass it on.
Hi Mark,
Thank you for assigning this to me.
I am current following the 'Building Firefox On Windows' guide:
https://firefox-source-docs.mozilla.org/setup/windows_build.html#building-firefox-on-windows
No doubt, I'll be in touch if there's something that's taking too long for me to solve...
Comment 5•5 years ago
|
||
So, I tried to build firefox as received the errors below
########################################### THE OUTPUT FROM MY SESSION ##################################################
$ ./mach bootstrap
Note on Artifact Mode:
Artifact builds download prebuilt C++ components rather than building
them locally. Artifact builds are faster!
Artifact builds are recommended for people working on Firefox or
Firefox for Android frontends, or the GeckoView Java API. They are unsuitable
for those working on C++ code. For more information see:
https://developer.mozilla.org/en-US/docs/Artifact_builds.
Please choose the version of Firefox you want to build:
- Firefox for Desktop Artifact Mode
- Firefox for Desktop
- GeckoView/Firefox for Android Artifact Mode
- GeckoView/Firefox for Android
Your choice: 2
Your version of Python 3 (3.7.4) is new enough.
Your version of Python 2 (2.7.16) is new enough.
Your version of Mercurial (5.1.2) is sufficiently modern.
Found rustup. Will try to upgrade.
info: no updatable toolchains installed
info: checking for self-updates
info: cleaning up downloads & tmp directories
error: no override and no default toolchain set
Error running mach:
['bootstrap']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file bootstrap| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
subprocess.CalledProcessError: Command '['c:/Users/Leroy Douglas\.cargo\bin\rustup.exe', 'component', 'add', 'rustfmt']' returned non-zero exit status 1.
File "C:\mozilla-build\msys\mozilla-source\mozilla-central\python/mozboot/mozboot/mach_commands.py", line 46, in bootstrap
bootstrapper.bootstrap()
File "C:\mozilla-build\msys\mozilla-source\mozilla-central\python/mozboot\mozboot\bootstrap.py", line 505, in bootstrap
self.instance.ensure_rust_modern()
File "C:\mozilla-build\msys\mozilla-source\mozilla-central\python/mozboot\mozboot\base.py", line 713, in ensure_rust_modern
self.upgrade_rust(rustup)
File "C:\mozilla-build\msys\mozilla-source\mozilla-central\python/mozboot\mozboot\base.py", line 761, in upgrade_rust
subprocess.check_call([rustup, 'component', 'add', 'rustfmt'])
File "c:\mozilla-build\python3\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
Leroy Douglas@DESKTOP-9D490NM /mozilla-source/mozilla-central
Comment 6•5 years ago
|
||
Hmm, sorry I've not seen that error before. Try asking in the #introduction channel on Matrix: https://wiki.mozilla.org/Matrix - it might take a little while being the weekend, but someone there should hopefully be able to help you.
Comment 7•5 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #6)
Hmm, sorry I've not seen that error before. Try asking in the #introduction channel on Matrix: https://wiki.mozilla.org/Matrix - it might take a little while being the weekend, but someone there should hopefully be able to help you.
Okay, I'll do that, but before I do, I've decided to build a linux environment under Virtualbox...I'll try this, and see how I get.
Comment 8•5 years ago
|
||
Okay, so I've switched to Linux(Ubuntu 20.02) now, and I've successfully completed a full build...I've also joined the #introduction channel on Matrix...
Comment 9•5 years ago
|
||
I don't think Leroi is working on this now. See comment 1 for what to do.
Assignee | ||
Comment 10•5 years ago
|
||
Hey Mark,
I'd like to try this one.
Thanks for the pointers, I'll try to cook up a patch.
Assignee | ||
Comment 11•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
Hey :standard8,
I think the patch is ready for review. Can you take a look at it please?
Comment 13•5 years ago
|
||
No need to needinfo me here, we get notified about the patches via phabricator.
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
bugherder |
Description
•