Closed Bug 1819569 Opened 1 year ago Closed 1 year ago

Removing clusters of unused files

Categories

(Firefox :: General, enhancement)

Firefox 110
enhancement

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: arthur.carcano, Assigned: arthur.carcano)

References

Details

Attachments

(5 files, 6 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

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

Using reachable we have identified files that could potentially be removed from the code base. We found a total of 986 dead files over 187 third-party paths, with:

  • 661 isolated files
  • 92 clusters mentioning a total of 325 files

Of these 92 clusters, 11 contains five files or more. This issue tracks the removal of these clusters.

Assignee: nobody → arthur.carcano
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

In general, please do not modify/delete files under third_party/libwebrtc before socializing the change with the webrtc/media group. We have a (mostly) automated process that deals with importing upstream changes that requires special handling of changes to upstream. It may be possible in the future to address targeted removal of files, but at the moment this is not recommended. Additionally, all moz.build files under third_party/libwebrtc are automatically generated, so we cannot accept direct changes to those files.

Flags: needinfo?(arthur.carcano)

I'm afraid it's the same for ffvpx, for reasons similar to what Michael said, and probably nss/ and gfx/angle. I'm cc-ing relevant people for those two to have an authoritative answer.

https://searchfox.org/mozilla-central/source/tools/rewriting/ThirdPartyPaths.txt has an up-to-date list of path containing various things where mozilla-central is not upstream, and/or where the update process has to be manual and careful. It can be used to prune a list of path for any automated analysis.

Flags: needinfo?(egubler)
Flags: needinfo?(bbeurdouche)

Similarly to webrtc, we are shipping a full copy of NSS, independently of what is used by Firefox. It has been confirmed multiple times that we don't want to diverge. : )

Flags: needinfo?(bbeurdouche)

gfx/angle/checkout is third-party code as well, and we shouldn't mess with it here I think.
https://searchfox.org/mozilla-central/rev/a2d875255c67e39b28d59a0996e8b54fa2d7564e/tools/rewriting/ThirdPartyPaths.txt#58

Flags: needinfo?(egubler)

And msgpack is also actually third_party/msgpack/* so that should also likely stay.

Hi everyone!

Sorry for causing such turmoil!

After discussing with marco, I will update the PRs to not delete any C or C++ file but instead edit the moz.builds or their generating script if any.
If these moz.build/generating scripts are not managed by upstream but by mozilla, then I reckon this should be ok with you. If patches are required to build-scripts from upstream that are used to generate moz.builds, then I will recheck with marco how to proceed.

Regarding ThirdPartyPaths, that is the list we are using... as starting point for our analysis, as I think the scope of this project is specifically to remove code in third parties.

Flags: needinfo?(arthur.carcano)

Please don't complicate the moz.build generation files in gfx/angle, because robustness there is more important than perfection.

Specifically, unless the install size is adversely affected, I don't think it's important to prune these carefully.

Depends on: 1820869
Attachment #9320503 - Attachment is obsolete: true
Attachment #9320502 - Attachment is obsolete: true
Attachment #9320501 - Attachment is obsolete: true
Attachment #9320498 - Attachment is obsolete: true
Attachment #9320495 - Attachment is obsolete: true
Attachment #9320490 - Attachment is obsolete: true
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3ef19d12bd42
Remove nss/crmf cluster. r=bbeurdouche
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/af3d9a96e9bf
Remove msgpack cluster. r=sylvestre
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Component: Untriaged → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: