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

"clang_format.py format-my" dies on git-deleted files

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • Dev Tools 2019-09-23

      the script dies as it tries to format a file that has been "git rm"-ed.

      In this client, I've removed src/mongo/util/stacktrace_unwind.cpp.

      (venv3) billy@billydev:~/dev/mongodb/mongo$ buildscripts/clang_format.py format-my
      adding module: enterprise
      adding module: ninja
      Exception in thread Thread-1:
      Traceback (most recent call last):
        File "/opt/mongodbtoolchain/stow/python3-v3.8CA/lib/python3.7/threading.py", line 917, in _bootstrap_inner
          self.run()
        File "/opt/mongodbtoolchain/stow/python3-v3.8CA/lib/python3.7/threading.py", line 865, in run
          self._target(*self._args, **self._kwargs)
        File "/home/billy/dev/mongodb/mongo/buildscripts/linter/parallel.py", line 37, in worker
          ret = func(item)
        File "buildscripts/clang_format.py", line 281, in format
          if self._lint(file_name, print_diff=False):
        File "buildscripts/clang_format.py", line 247, in _lint
          with open(file_name, 'rb') as original_text:
      FileNotFoundError: [Errno 2] No such file or directory: '/home/billy/dev/mongodb/mongo/src/mongo/util/stacktrace_unwind.cpp'
      
      

            Assignee:
            mathew.robinson@mongodb.com Mathew Robinson (Inactive)
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: