Closed Bug 1639509 Opened 4 years ago Closed 4 years ago

Remove "mach uuid"

Categories

(Firefox Build System :: Mach Core, task, P4)

task

Tracking

(firefox81 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=python])

Attachments

(3 files, 1 obsolete file)

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

According to https://sql.telemetry.mozilla.org/queries/71268/source?p_date=d_this_month
mach search are super rarely used (6 usages this month) and we don't need "uuid" anymore for the Firefox development.

We have too many mach target, we should trim the list a bit

https://searchfox.org/mozilla-central/source/tools/mach_commands.py#99-116

Tutorial:
https://firefox-source-docs.mozilla.org/contributing/how_to_contribute_firefox.html

Severity: -- → S4
Priority: -- → P4

I want to contribute. How can I start fixing this bug?

Hi, should I just remove the class or something else is expected?

@CommandProvider
class UUIDProvider(object):
    @Command('uuid', category='misc',
             description='Generate a uuid.')
    @CommandArgument('--format', '-f', choices=['idl', 'cpp', 'c++'],
                     help='Output format for the generated uuid.')
    def uuid(self, format=None):
        import uuid
        u = uuid.uuid4()
        if format in [None, 'idl']:
            print(u)
            if format is None:
                print('')
        if format in [None, 'cpp', 'c++']:
            u = u.hex
            print('{ 0x%s, 0x%s, 0x%s, \\' % (u[0:8], u[8:12], u[12:16]))
            pairs = tuple(map(lambda n: u[n:n+2], range(16, 32, 2)))
            print(('  { ' + '0x%s, ' * 7 + '0x%s } }') % pairs)

Should be enough!

Attached file Bug 1639509 Remove mach uuid (obsolete) —

Hi, I have submitted the changes

Hi, please review the submission.

Please set a reviewer. See:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html#to-write-a-patch

Next time, please amend the existing review instead of creating a new one (documented on the same page)

Assignee: nobody → sledru
Status: NEW → ASSIGNED
Attachment #9155932 - Attachment is obsolete: true

I tried submitting to the same revision but I was unable to, on using 'moz-phab submit' it created a new revision, 'hg histedit' had only 1 pick

(In reply to Nilabja Bhattacharya from comment #11)

I tried submitting to the same revision but I was unable to, on using 'moz-phab submit' it created a new revision, 'hg histedit' had only 1 pick

Sometimes this can happen if you do hg commit -m "..." --amend if you leave out the -m "...." part it should pop up an editor for the commit message. In said editor just leave the url to our phabricator instance intact and things should just work.

(In reply to Justin Wood (:Callek) from comment #13)

(In reply to Nilabja Bhattacharya from comment #11)

I tried submitting to the same revision but I was unable to, on using 'moz-phab submit' it created a new revision, 'hg histedit' had only 1 pick

Sometimes this can happen if you do hg commit -m "..." --amend if you leave out the -m "...." part it should pop up an editor for the commit message. In said editor just leave the url to our phabricator instance intact and things should just work.

Thank you for the comment, I will do this the next time. Should I make changes to the current revision or is it fine?

(In reply to Sylvestre Ledru [:Sylvestre] from comment #9)

Please set a reviewer. See:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html#to-write-a-patch

Next time, please amend the existing review instead of creating a new one (documented on the same page)

Hi, please look into the fix D79540.

Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5295aa971bf7
Remove mach uuid r=championshuttler,rstewart
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Regressions: 1657198

On a Debian/Ubuntu: this can be done with https://packages.debian.org/bullseye/uuid on
$ uuid -m
c993d6fa-91ed-11eb-9ae4-c33cdeab2ba3

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: