Closed Bug 1669968 Opened 4 years ago Closed 2 years ago

[meta] Stop using lodash in the debugger codebase

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: jdescottes, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Keywords: meta)

Attachments

(1 file)

lodash is a huge dependency in the debugger (16K lines), and seems to be mostly used for simple helpers. https://searchfox.org/mozilla-central/search?q=lodash&path=debugger%2Fsrc%2F&case=false&regexp=false

The goal of this meta is to stop using lodash. It can be done file by file, or method by method. When trying to replace a lodash import, we should also take the opportunity to review if the usage really makes sense before porting the lodash helper.

The complete list of lodash methods is:

  • debounce
  • difference
  • escapeRegExp
  • findIndex
  • findLastIndex
  • flatMap
  • flatten
  • flattenDeep
  • fromPairs
  • groupBy
  • has
  • isEmpty
  • isEqual
  • kebabCase
  • memoize
  • move
  • omit
  • pullAt
  • range
  • remove
  • sortBy
  • throttle
  • times
  • toPairs
  • union
  • uniq
  • uniqBy
  • without
  • zip

The meta keyword is there, the bug doesn't depend on other bugs and there is no activity for 12 months.
:Honza, maybe it's time to close this bug?

Flags: needinfo?(odvarko)

Nicolas, we were discussing this recently. Are there any specific bugs we could add as dependencies?

Flags: needinfo?(odvarko) → needinfo?(nchevobbe)

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #2)

Nicolas, we were discussing this recently. Are there any specific bugs we could add as dependencies?

I don't think if we have such bug, we'd have to file them individually.
IMO we could file individual bugs to remove specific lodash method, as it would be easier for someone to tackle such task (instead of doing it file by file, where you might have to deal with different methods)

I'll try to file some

Flags: needinfo?(nchevobbe)
Depends on: 1737800
Depends on: 1737805
Depends on: 1737960
Depends on: 1737967
Depends on: 1737968
Depends on: 1737969
Depends on: 1737970
Depends on: 1737971
Depends on: 1737972
Depends on: 1737973
Depends on: 1737974
Depends on: 1737976
Depends on: 1737977
Depends on: 1737978
Depends on: 1737980
Depends on: 1737981
Depends on: 1737983
Depends on: 1737985
Depends on: 1737986
Depends on: 1737988
Depends on: 1737989
Depends on: 1737990
Depends on: 1737993
Depends on: 1737995

We should have the full list of blocker bugs now

Depends on: 1750505
Depends on: 1750514
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/da79de368bfa
[devtools] Remove lodash from tree.r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: