Port bug 1753696 - Use an eslint rule to transform existing setup tasks to use add_setup
Categories
(Thunderbird :: Upstream Synchronization, task)
Tracking
(thunderbird_esr91 unaffected)
Tracking | Status | |
---|---|---|
thunderbird_esr91 | --- | unaffected |
People
(Reporter: darktrojan, Assigned: darktrojan)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Assignee | ||
Comment 1•10 months ago
|
||
I've used eslint --fix
to automatically convert setup tasks named setup.
It seems like a good time to convert (formerly Mozmill) setupModule tasks to add_setup, and remove the name and argument of teardownModule functions, so I've done that too.
Assignee | ||
Updated•10 months ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/2f56531b9e8c
Port bug 1753696 - Use an eslint rule to transform existing setup tasks to use add_setup. r=aleca
Comment 3•10 months ago
•
|
||
I think we need a follow up because the rule didn't quite work in all cases.
E.g. https://hg.mozilla.org/comm-central/rev/2f56531b9e8c#l12.12 is
-add_task(async function setupModule(module) {
+add_task(async function() {
when it should be
-add_task(async function setupModule(module) {
+add_setup(async function() {
I'm not sure what caused this. And it mostly did worked as expected for the same pattern https://hg.mozilla.org/comm-central/rev/2f56531b9e8c#l40.12
EDIT: Actually, if you search the diff for "+add_task" there's only two cases where this happened.
Comment 4•10 months ago
|
||
(In reply to Henry Wilkes [:henry] from comment #3)
I think we need a follow up because the rule didn't quite work in all cases.
...
EDIT: Actually, if you search the diff for "+add_task" there's only two cases where this happened.
Sorry. I didn't look through it properly before. I see now that in those two cases they were actually tasks, and should not have been setupModule
in the first place.
Sorry for the noise.
Updated•10 months ago
|
Description
•