Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul of convert_project and related tools #724

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattmccutchen-cci
Copy link
Member

@mattmccutchen-cci mattmccutchen-cci commented Oct 14, 2021

I'm planning to do a few things in this PR:

  1. General code cleanup of convert_project and removal of obsolete code/features.
  2. Factor code for manipulating compilation databases out of generate_ccommands.py so it can be used by the macro expander CLI (see below) and by utils-5c.
  3. Add support for compilation databases generated by CMake that use the arguments field (fixes Ensure that convert_project works with compilation databases that use the command field #720).
  4. Add a direct command-line interface to the macro expander (fixes Make a direct command-line interface to the macro expander #635).
  5. Parallelize the macro expander using Python multiprocessing.

This needs a lot more work and testing, but I'm going ahead and posting it in case anyone is curious. The corresponding draft PR for utils-5c is correctcomputation/utils-5c#19.

Currently, the settings.json file is just a distraction. If we want to
add back support for the normal Checked C clangd or some future
specialized 3C clangd, we can revert this commit if we want to, but it's
more likely that we'll need something different anyway.
- Remove convert_individual.sh: We haven't used this in a long time, and
  I don't think it's very useful. At this point, we're pretty committed
  to running 3C on all files to take advantage of cross-file
  information, and even if we wanted to run it on one file,
  convert_individual.sh likely wouldn't be exactly what we want.

- Remove nmake workaround: I don't think we use this any more.

- convert_all.sh: Use a bash array literal to make it easier for the
  user to comment out individual lines. (I've been wanting this for a
  while.)
Factor out code to be used by utils-5c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant