Open Bug 1685948 Opened 5 years ago Updated 3 years ago

Stop treating gfx/wr as third-party code

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(Not tracked)

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(12 files, 9 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

The gfx/wr directory is currently both on the ThirdPartyPaths list and on the clang-format-ignore list.

I think that's by mistake. The "primary repo" for WebRender used to live on github, but as of several years ago, mozilla-central has become the primary repo and the github repo is just a mirror.

I think we should treat all of WebRender as first-party mozilla-central code, so that it can benefit from automatic code formatting and linting.

There is an existing rustfmt.toml in gfx/wr:

reorder_imports = false
reorder_imports_in_group = true
reorder_imported_names = true
error_on_line_overflow_comments = false
max_width = 100
spaces_around_ranges = true

Depends on D101303

ignore-this-changeset

Depends on D101304

ignore-this-changeset

Depends on D101305

ignore-this-changeset

Depends on D101306

ignore-this-changeset

Depends on D101307

ignore-this-changeset

Depends on D101308

ignore-this-changeset

Depends on D101309

This was not done by the automatic reformatting, and it now fails the build because of warnings-as-errors.

Depends on D101310

Depends on D101312

ignore-this-changeset

Depends on D101315

Depends on D101316

ignore-this-changeset

Depends on D101317

ignore-this-changeset

Depends on D101318

This preserves behavior. I haven't checked whether GLSL actually wants implicit conversions for all of these.

Depends on D101319

Blocks: rustfmt

Depends on D101321

Depends on D101311

Blocks: 1685986

Comment on attachment 9196346 [details]
Bug 1685948 - Enable ESLint on gfx/wr/debugger/ where possible. r?mstange!

Revision D101334 was moved to bug 1685986. Setting attachment 9196346 [details] to obsolete.

Attachment #9196346 - Attachment is obsolete: true

Landing this is currently blocked on the servo-tidy job, which this turns red: https://treeherder.mozilla.org/jobs?repo=try&revision=b01972f086da20c0d582ca5a8bef28cf6df95614&selectedTaskRun=evEC6KvLRM2Ryn5Y1LkjCg.0

That's because our version of servo-tidy (which is the version that was published as 0.3.0) is rather outdated and checks for two things that rustfmt does not agree with (position of operators w.r.t. line breaks, and multi-line use statements).
I've asked for a new servo-tidy release on https://github.com/servo/servo/issues/28034 .

In the meantime, I will see if I can land the clang-format changes separately.

Depends on: 1686635

Comment on attachment 9196318 [details]
Bug 1685948 - Reformat example-compositor C++ code. r=gw

Revision D101318 was moved to bug 1686635. Setting attachment 9196318 [details] to obsolete.

Attachment #9196318 - Attachment is obsolete: true

Comment on attachment 9196319 [details]
Bug 1685948 - Reformat SWGL C++ code. r=lsalzman

Revision D101319 was moved to bug 1686635. Setting attachment 9196319 [details] to obsolete.

Attachment #9196319 - Attachment is obsolete: true

Comment on attachment 9196322 [details]
Bug 1685948 - Annotate implicit conversion constructors in SWGL. r=lsalzman

Revision D101321 was moved to bug 1686635. Setting attachment 9196322 [details] to obsolete.

Attachment #9196322 - Attachment is obsolete: true

Comment on attachment 9196324 [details]
Bug 1685948 - Make ClipRect constructors explicit. r=lsalzman

Revision D101323 was moved to bug 1686635. Setting attachment 9196324 [details] to obsolete.

Attachment #9196324 - Attachment is obsolete: true

Comment on attachment 9196316 [details]
Bug 1685948 - Fix line endings in .clang-format-ignore. r=sylvestre

Revision D101316 was moved to bug 1686635. Setting attachment 9196316 [details] to obsolete.

Attachment #9196316 - Attachment is obsolete: true

Comment on attachment 9196317 [details]
Bug 1685948 - Remove gfx/wr from .clang-format-ignore. r=sylvestre

Revision D101317 was moved to bug 1686635. Setting attachment 9196317 [details] to obsolete.

Attachment #9196317 - Attachment is obsolete: true

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:mstange, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(mstange.moz)
Attachment #9196304 - Attachment is obsolete: true
Attachment #9196303 - Attachment is obsolete: true

Clearing stale needinfos.

Flags: needinfo?(mstange.moz)
Product: Firefox Build System → Developer Infrastructure

I never finished this, and at this point it would make more sense for somebody on the WR team to take this over if it's desired.

Assignee: mstange.moz → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: