f18 icon indicating copy to clipboard operation
f18 copied to clipboard

[LLVMify F18] Compiler module folders should have capitalised names

Open DavidTruby opened this issue 5 years ago • 9 comments

Paths such as lib/parser, lib/semantics etc in clang and llvm have capitalized folder names (lib/Parser and so on). We should match this for consistency with the rest of the LLVM project.

DavidTruby avatar Feb 04 '20 14:02 DavidTruby

Does anyone know why git mv and git add in the same file is seeing by git as a file deleted in the old place and a new one created in the new place? For instance: renamed: lib/common/CMakeLists.txt -> lib/Common/CMakeLists.txt (only git mv) new file: lib/Common/Fortran-features.cpp . (git mv and git add) deleted: lib/common/Fortran-features.cpp

CarolineConcatto avatar Feb 07 '20 13:02 CarolineConcatto

Was this example for illustration or did you see the issue on this file (Fortran-features.cpp)? Are you renaming individual files or the directory as a whole? For me, git mv lib/common lib/Common worked and it showed all files in the directory as renames.

I don't know why this happens. But i have seen the same issue in one of Luke's patches.

kiranchandramohan avatar Feb 09 '20 00:02 kiranchandramohan

I see on Fortran-Features, but also in others as well. I did git move for the entire folder, and after that git add. The problem happens when I do git add in the file. If it was changed git sees as a new file for some reason.

CarolineConcatto avatar Feb 10 '20 09:02 CarolineConcatto

OK.

Are you doing a 'git add' because you are modifying the contents of the file?

You might have already seen this, online help seems to suggest the following,

  1. git stores renames as addition and deletion internally. It has some function to check whether a rename has happened and it does that by comparing the old file and the new file. If the changes are below a threshold it will detect the rename operation otherwise it will not.
  2. Do the rename and modify (add) in separate commits to overcome this issue.

kiranchandramohan avatar Feb 10 '20 09:02 kiranchandramohan

Yes, git add after modifying. A little bit annoying that I need to do in 2 commits, but let do it then in order to not mess with git history of everyone. Thanks, Kiran.

CarolineConcatto avatar Feb 10 '20 10:02 CarolineConcatto

Check with @peterwaller-arm whether this issue will re-appear when the commits are squashed before committing or when using peter's script for submission.

kiranchandramohan avatar Feb 10 '20 10:02 kiranchandramohan

I have done PR for this task: https://github.com/flang-compiler/f18/pull/980

CarolineConcatto avatar Feb 11 '20 15:02 CarolineConcatto

Question: should the namespaces also need to be changed? Like: namespace Fortran::common { namespace Fortran::decimal {

CarolineConcatto avatar Feb 12 '20 20:02 CarolineConcatto

Question: should the namespaces also need to be changed? Like: namespace Fortran::common { namespace Fortran::decimal {

In clang and llvm the namespace names are lower case, so we should follow that

DavidTruby avatar Feb 12 '20 20:02 DavidTruby