Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-94173

create script to clean up header associations in bazel

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Build
    • Fully Compatible

      basically via bazel query interface, a script can search for headers which are added to the wrong library, via header and cpp name associations, for example my_file.cpp and my_file.h are associated. The cpp is only associated with one library and so we make sure the header is also associated with that library. At the same time, the tool would suggest the dep changes that are needed to allow the header to move to the correct location. The output of this tool could be input to buildozer, which can automatically apply changes to bazel BUILD files.

      for headers which do not have direct associations they would be grouped per directory. We could make configuration files for the script to ignore certain headers if the devs want it to live on a specific library even if it has no cpp association.

      we want to script to basically output something like a human readable report as well as a output a input file(s) for something else to apply the changes if desired. We plan to run this nightly as we convert and then hopefully use it to create PRs to fix libraries as we go.

            Assignee:
            zac.codiamat@mongodb.com Zac Codiamat
            Reporter:
            daniel.moody@mongodb.com Daniel Moody
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: