Closed
Bug 1508180
Opened 5 years ago
Closed 5 years ago
Use uppercase names for high-order macros to please clang-format
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox-esr60 fixed, firefox65 fixed)
RESOLVED
FIXED
mozilla65
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(8 files, 3 obsolete files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
5.47 KB,
patch
|
lizzard
:
approval-mozilla-esr60+
|
Details | Diff | Splinter Review |
5.13 KB,
patch
|
lizzard
:
approval-mozilla-esr60+
|
Details | Diff | Splinter Review |
221.31 KB,
patch
|
lizzard
:
approval-mozilla-esr60+
|
Details | Diff | Splinter Review |
One pattern of failures I see is when using function-like macros that do no use uppercase names or trailing semi-colons. Examples: https://github.com/sylvestre/gecko-dev/blob/master/mfbt/RecordReplay.h#L399 https://github.com/sylvestre/gecko-dev/blob/master/js/src/frontend/ParseNode.h#L526 I have a few patches which simply change casing to significantly improve the clang-format result without needing to |clang-format off|.
Assignee | ||
Comment 1•5 years ago
|
||
This pleases clang-format and makes many of these behave better when auto formatted. Special cases may still be marked |clang-format off| in later commits.
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D12231
Assignee | ||
Comment 3•5 years ago
|
||
Use uppercase names for MOZ_MAKERECORDREPLAYWRAPPER* so that clang-format doesn't get confused and think these are return value types of functions. Depends on D12232
Assignee | ||
Comment 4•5 years ago
|
||
This makes clang-format stop mangling the macros. Depends on D12233
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D12234
Assignee | ||
Comment 6•5 years ago
|
||
These changes should only change casing and all other naming and formatting is untouched. Try in progress: https://treeherder.mozilla.org/#/jobs?repo=try&revision=70accb1a4b0e104551319f5c79539a9bdde22721
Assignee | ||
Comment 7•5 years ago
|
||
Updated js/ patch to fix various python scripts that were using regex to find |macro|. New try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=882ecb7ff7b13ba6d1f9c67f26f7a458218b59bd
Assignee | ||
Comment 8•5 years ago
|
||
Landing part 1 immediately to avoid it rotting.
Keywords: leave-open
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8dd8f4166c9 Use uppercase names for high-order macros in js/ r=jandem
Comment 10•5 years ago
|
||
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b020ea6c58e5 Use uppercase names for high-order macros in dom/ r=mccr8 https://hg.mozilla.org/integration/autoland/rev/b4ac72eabda0 Use uppercase macro names in mfbt/RecordReplay.h r=bhackett https://hg.mozilla.org/integration/autoland/rev/ffed3e597810 Use uppercase high-order macro names in xptinfo. r=nika https://hg.mozilla.org/integration/autoland/rev/0c683a3e80d8 Use uppercase high-order macro names in profiler. r=mstange
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c8dd8f4166c9 https://hg.mozilla.org/mozilla-central/rev/b020ea6c58e5 https://hg.mozilla.org/mozilla-central/rev/b4ac72eabda0 https://hg.mozilla.org/mozilla-central/rev/ffed3e597810 https://hg.mozilla.org/mozilla-central/rev/0c683a3e80d8
Assignee | ||
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox65:
--- → fixed
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 12•5 years ago
|
||
[ESR Uplift Approval Request] If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is required for easier backporting of patches after the reformatting of ESR using clang-format. User impact if declined: Declining this will negatively impact our developers' ability to easily backport their patches to ESR in the future. Fix Landed on Version: 65 Risk to taking this patch: Low Why is the change risky/not risky? (and alternatives if risky): This just changes the case of the names used in a C++ macro, virtually risk free. String or UUID changes made by this patch: None
Attachment #9030981 -
Flags: approval-mozilla-esr60?
Comment 13•5 years ago
|
||
Please see comment 12.
Attachment #9030982 -
Flags: approval-mozilla-esr60?
Comment 14•5 years ago
|
||
Attachment #9030983 -
Flags: approval-mozilla-esr60?
Comment 15•5 years ago
|
||
Attachment #9030984 -
Flags: approval-mozilla-esr60?
Comment 16•5 years ago
|
||
Attachment #9030985 -
Flags: approval-mozilla-esr60?
Comment 17•5 years ago
|
||
Please see comment 12.
Attachment #9030981 -
Attachment is obsolete: true
Attachment #9030981 -
Flags: approval-mozilla-esr60?
Attachment #9030989 -
Flags: approval-mozilla-esr60?
status-firefox-esr60:
--- → affected
Comment on attachment 9030989 [details] [diff] [review] ESR patch (part 1) OK for uplift to ESR60 as part of the clang-format project.
Attachment #9030989 -
Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Attachment #9030985 -
Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Attachment #9030984 -
Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Attachment #9030983 -
Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Attachment #9030982 -
Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Comment 19•5 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-esr60/rev/1771e117ecae https://hg.mozilla.org/releases/mozilla-esr60/rev/ceb0a1655f01 https://hg.mozilla.org/releases/mozilla-esr60/rev/92d2ea3e3faa
Updated•5 years ago
|
Attachment #9030982 -
Attachment is obsolete: true
Updated•5 years ago
|
Attachment #9030985 -
Attachment is obsolete: true
Updated•10 months ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•