Created attachment 87450 [details]
proof of concept
gbuild now has a pretty complete view of the build and thus we can identify
which C/C++ files are used during the build. This can be used to identify cxx files in the repository that are never build and thus should be removed.
A simple approach to this would be the the one taken in fdo#70371: scan the dep
An alternative is the attached patch which does not need a build and derives
the info directly from gbuild. The advantage here is, that with a bit of
tweaking, this could even 'see' which parts of the build are used on other
platforms (by switching some variables from config_host.mk).
So this Easy Hack is to start with one of the approaches above:
- make them work with C/C++/Objective C files
- compare the result with `git ls-tree` output (see fdo#70731)
- output possibly unused files in the repository
bonuspoints for making this aware of multiple platforms to reduce false
positives, but this is not required to close this bug as resolved/fixed. ;)
I would like to work on this bug but am new to this and this would be my first. Can someone please guide?
@Varadharajan: Well, since somebody already provided a script at https://bugs.freedesktop.org/show_bug.cgi?id=70371 -- you need to get your build going e.g. as per https://wiki.documentfoundation.org/Development/BuildingOnLinux and then modify the script to scan for source files, not headers.
In general please dont ask for "please guide" in general, but with a concrete question, so we can help you. Also chat (libreoffice-dev on freenode) is a better medium for this as we can help you interactively:
Okay thanks for the pointer. I have already got my build going. will look into the script provided
(In reply to comment #2)
> @Varadharajan: Well, since somebody already provided a script at
> https://bugs.freedesktop.org/show_bug.cgi?id=70371 -- you need to get your
> build going e.g. as per
> https://wiki.documentfoundation.org/Development/BuildingOnLinux and then
> modify the script to scan for source files, not headers.
> In general please dont ask for "please guide" in general, but with a
> concrete question, so we can help you. Also chat (libreoffice-dev on
> freenode) is a better medium for this as we can help you interactively:
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillScript)
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)
We have bin/find-files-not-referenced-by-makefile.py since:
I think we can close this, thanks to Noel Grandin :)