[SERVER-24355] clang_format leaves temporary files around after a reformat Created: 02/Jun/16  Updated: 05/Jul/16  Resolved: 09/Jun/16

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.3.8
Fix Version/s: 3.3.9

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 16 (06/24/16)
Participants:

 Description   

After upgrading clang_format to version 3.8 I noticed that each time it formats a source file it leaves a .TMP file around. For example:

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory
        modified:   src/mongo/db/commands.cpp
        modified:   src/mongo/db/commands.h
 
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        src/mongo/db/commands.cpp~RF3ac591c5.TMP
        src/mongo/db/commands.cpp~RF3aca5030.TMP
        src/mongo/db/commands.h~RF3ac591c5.TMP

Having these files around makes it difficult to run git add src/., because they will get added to the source tree as well.



 Comments   
Comment by Githook User [ 09/Jun/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-24355 Add a clang_format.py missing import
Branch: master
https://github.com/mongodb/mongo/commit/3f7dce2ea7a4692380e04d09da89388c23133635

Comment by Githook User [ 08/Jun/16 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-24355 clang_format leaves temporary files around after a reformat
Branch: master
https://github.com/mongodb/mongo/commit/8e9a032204dd891b47dc552b0ce90c5c57c2d744

Comment by Mark Benvenuto [ 07/Jun/16 ]

I can repro the issue with clang-format 3.8. It does not repro for me with master branch. Here is a related upstream bug report: https://llvm.org/bugs/show_bug.cgi?id=26286

Comment by Andy Schwerin [ 03/Jun/16 ]

I think it would be a fine solution to ignore.TMP files.

On Fri, Jun 3, 2016 at 10:15 AM Kaloian Manassiev (JIRA) <jira@mongodb.org>

Comment by Kaloian Manassiev [ 03/Jun/16 ]

I was hoping that this is just some setting, which can be passed to the underlying LLVM module, but I see that there are some LLVM bugs with similar description.

I am fine with just adding .TMP to .gitignore and if it is acceptable solution I can make the change.

Comment by Andy Schwerin [ 03/Jun/16 ]

kaloian.manassiev, would it suffice to add *.TMP (or whatever the globbing rules are) to the .gitignore file?

Generated at Thu Feb 08 04:06:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.