Closed Bug 1635098 Opened 5 years ago Closed 4 years ago

Can't use nullish coalescing operator in newtab jsm code because it's built into unit tests with babel without support for that operator

Categories

(Firefox :: New Tab Page, task, P5)

task

Tracking

()

RESOLVED FIXED
Firefox 78
Tracking Status
firefox78 --- fixed

People

(Reporter: Gijs, Assigned: Mardak)

References

Details

Attachments

(1 file)

X-ref bug 1635054.

This is extra bad because the eslint configuration uses babel as configured in the toplevel directory, which does have support - just like Firefox. So you get no errors from the linter, and although the build breaks, this doesn't fail the job on infra (bug 1635090) so we're just silently breaking things and not noticing. :-(

Ideally, both the newtab code and the toplevel code should be using the same babel config, and AIUI then this whole problem goes away.

Priority: -- → P5

@Gjis – Can you update the severity of this issue? And, is this something you're interested in working on?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Gavin Suntop [:gvn] (he/they) from comment #1)

@Gjis – Can you update the severity of this issue? And, is this something you're interested in working on?

I'm not very familiar with the babel set-up, so I don't think I'm the right person to work on this. Mark, do you have ideas about how to fix this? Maybe you could mentor it?

I'm also not sure about the severity. I mean, it doesn't affect users, right? So I guess N/A ? I've set it to that for now. Do you not have permissions to set it (that'd seem like a bug?) or were you just wanting to ask me for an opinion? :-)

Severity: -- → N/A
Type: defect → task
Flags: needinfo?(standard8)
Flags: needinfo?(gsuntop)
Flags: needinfo?(gijskruitbosch+bugs)

Include babel plugins to allow unit testing of files using the operators.
Reverts "Bug 1635054 - stop using ?. operator in newtab download manager code, r=aryx"

Assignee: nobody → edilee
Status: NEW → ASSIGNED

Thanks for picking this up Ed. The approach here looks good.

(fwiw I disagree with this being marked as a P5 as it is a developer workflow issue that has already caused extra work and might continue to do so as developers expect to be able to use the newer operators everywhere ESLint supports).

Flags: needinfo?(standard8)
Flags: needinfo?(gsuntop)
Pushed by elee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6e7282ed160b Allow nullish coalescing and optional chaining operators in newtab jsm code r=k88hudson
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78
See Also: → 1786563
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: