Closed Bug 1762322 Opened 10 months ago Closed 10 months ago

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)

RESOLVED FIXED
100 Branch
Tracking Status
thunderbird_esr91 --- unaffected

People

(Reporter: darktrojan, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.

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.

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

Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED

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.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

(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.

Status: REOPENED → RESOLVED
Closed: 10 months ago10 months ago
Resolution: --- → FIXED
Blocks: 1791459
You need to log in before you can comment on or make changes to this bug.