Open Bug 1617532 Opened 4 years ago Updated 2 years ago

Replace typedef by using

Categories

(Developer Infrastructure :: Source Code Analysis, task, P4)

Tracking

(Not tracked)

People

(Reporter: Sylvestre, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, leave-open)

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #1617528 +++

typedef are less readable than using

for example

  typedef void (*NativeIntersectionObserverCallback)(
      const Sequence<OwningNonNull<DOMIntersectionObserverEntry>>& aEntries);

becomes

  using NativeIntersectionObserverCallback =
      void (*)(const Sequence<OwningNonNull<DOMIntersectionObserverEntry>>&);

Running the autofix on js/

./mach static-analysis check --checks="-*, modernize-use-using" --fix  js

Done with:
./mach static-analysis check --checks="-*, modernize-use-using" --fix js/

Assignee: nobody → sledru
Status: NEW → ASSIGNED
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f449a588de9a
js/ replace typedef by using r=jandem

The leave-open keyword is there and there is no activity for 6 months.
:Sylvestre, maybe it's time to close this bug?

Flags: needinfo?(sledru)

Andi, do you think we should finish this ? (as good first bugs)
or just close it?

Flags: needinfo?(sledru) → needinfo?(bpostelnicu)

Let's finish it as a good first bug, it would be wise from us to get rid of as much legacy code as possible.

Assignee: sledru → nobody
Mentor: bpostelnicu
Status: ASSIGNED → NEW
Flags: needinfo?(bpostelnicu)
Keywords: good-first-bug
Priority: -- → P4

Hi! I'm Garima, an Outreachy participant, and would like to work on this bug :)

Flags: needinfo?(sledru)
Flags: needinfo?(bpostelnicu)

Hello Garima, please assign this bug t yourself and you can submit patches.

Flags: needinfo?(sledru)
Flags: needinfo?(bpostelnicu)

The leave-open keyword is there and there is no activity for 6 months.
:andi, maybe it's time to close this bug?

Flags: needinfo?(bpostelnicu)

Hi. I want to finish this bug. As I can see that @Sylvestre completed the replacement for js part. Am I right that is needed to replace typedef to using for other parts of the source code? By the way how to assign it to myself?

Forget to add needinfo :)

Flags: needinfo?(sledru)

yeah, doing it for a whole code base (and js too as it might have regressed). I tried a few days ago and it might requires some manual fixes too.

It will be assigned at your first patch.

Flags: needinfo?(sledru)
Flags: needinfo?(bpostelnicu)
No longer blocks: 1617528
Severity: normal → --
See Also: → 1617528
Assignee: nobody → tvaleev
Status: NEW → ASSIGNED

Hi Sylvestre! I started to change source code and have a question.
Firstly I ran ./mach static-analysis check --checks="-*, modernize-use-using" --fix js/ and only one file was fixed:
js/xpconnect/loader/AutoMemMap.h
But as I can see from rgrep output other files in js/ also has similar code. Just for example:
https://searchfox.org/mozilla-central/source/js/public/CharacterEncoding.h#31
typedef mozilla::Range<Latin1Char> Base;
So is it needed to fix them manually?

Flags: needinfo?(sledru)

the goal of this bug is to fix everything on the tree (probably directory by directory)
js/ is what we started with

don't bother about manual changes, leave them as it for now

Flags: needinfo?(sledru)
Attachment #9269574 - Attachment description: Bug 1617532 - replace typedef by using r?jandem,jwalden,Sylvestre → WIP: Bug 1617532 - replace typedef by using

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: tvaleev → nobody
Status: ASSIGNED → NEW
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: