Verify the possibility of adding a file duplication check to soong

Description

Task 782 show that there are many file duplications (or nearly identical duplications). Check if there is a way to add a verification in soong at the end of the build so that it warns about this.

Activity

Carlos Seo 
July 11, 2023 at 2:10 PM

Patch merged.

Carlos Seo 
May 15, 2023 at 11:52 PM

Although the patch is already approved, Stephen Hines wanted to double check a few things. It’s been 3 weeks, so I pinged him and I’m waiting for a response.

Carlos Seo 
March 2, 2023 at 10:03 PM

Carlos Seo 
December 22, 2022 at 3:44 PM

Patch sent to Google. If they think it’s interesting to add it to the build system, I’ll submit to AOSP upstream.

Carlos Seo 
December 7, 2022 at 7:22 PM

It is possible to add a script to the build system. As long as the commands used in the script are in the allowed list in PathConfigin build/soong/ui/build/paths/config.go, it should run.

The build system creates the rules from build/make/core/Makefile, so the script must be included in a target that depends on the file system image being generated. Soong will use this Makefile to generate a ninja file and the build will run as usual.

If we were to submit such a check to AOSP, I think it would be best to avoid changing the list of allowed commands, or at least not add anything that might be controversial in there (i.e. impacts security or reproducibility of builds).

Done

Details

Assignee

Reporter

Start date

Original estimate

Time tracking

1w logged2w remaining

Components

Fix versions

Priority

Checklist

Sentry

Created December 1, 2022 at 3:38 PM
Updated July 11, 2023 at 2:10 PM
Resolved July 11, 2023 at 2:10 PM