root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.63k stars 1.25k forks source link

Reserve "build" directory name in ROOT sources for build files #8031

Closed eguiraud closed 2 weeks ago

eguiraud commented 3 years ago

Explain what you would like to see improved

This would make it possible to use build as a build directory name under the source directory. Having a build directory under the source directory is common practice: several code editors do it by default, and it helps tools like ccache recognize when the same software is built multiple times (see ccache's base_dir feature).

There is a precedent in roottest in reserving build in .gitignore, and some C++ project layout guidelines such as pitchfork suggest the usage of build as a reserved, preferred name for build directories. Other precedents are entries such as cmake-build and .build in ROOT's .gitignore, with the exact same rationale, because those are the build directory names that CLion and VSCode pick.

Our current build directory should therefore be renamed and build should be added to our .gitignore.

An alternative considered was _build, but Axel suggested to use the more proper build, at the cost of renaming the already existing directory: see https://github.com/root-project/root/pull/8009 .

eguiraud commented 3 years ago

Hi, little ping on this, it would be a big quality of life improvement for me :)

guitargeek commented 3 months ago

This is a very low-hanging fruit, no? The directory build is not so populated anyway:

build
├── CMakeLists.txt
├── gdbPrinters
│   ├── libCore.so-gdb.py
│   └── libRooFitCore.so-gdb.py
├── misc
│   └── argparse2help.py
├── rmkdepend
│   ├── cppsetup.c
│   ├── def.h
│   ├── ifparser.c
│   ├── ifparser.h
│   ├── imakemdep.h
│   ├── include.c
│   ├── main.c
│   ├── mainroot.cxx
│   ├── parse.c
│   └── pr.c
├── unix
│   ├── check_dups_in_pcms.py
│   ├── compiledata.sh
│   ├── makedistsrc.sh
│   ├── makepchinput.py
│   ├── makereleasenotes.sh
│   ├── module.modulemap
│   ├── pandoc-jira.sh
│   └── rootmapcat.py
└── win
    ├── bindexplib
    │   └── bindexplib.cxx
    ├── cl.sh
    ├── f77.sh
    ├── ld.sh
    ├── makelib.sh
    ├── makeresource.sh
    ├── sehmap.h
    └── w32pragma.h

7 directories, 30 files

Alternative name suggestions:

Personally I would go for utils, because it mimics also a bit what LLVM does (see interpreter/llvm-project/llvm/utils).

guitargeek commented 3 months ago

I would really like if we can do something about this, as also nixpkgs uses by default the build directory in the sources for building :slightly_smiling_face:

Does anyone have feedback on my suggestion?

pcanal commented 3 months ago

We also already have a misc directory. The content of build is a mix of things that would belong there and things that are using during the build (and things that are seemingly not used (argparse2help?)).

So the content could also be dispersed between misc and cmake

pcanal commented 3 weeks ago

Following #16245, most of the build directory was moved out. Some are still left (looks like mostly items that could move to cmake directory)

guitargeek commented 3 weeks ago

@pcanal, thanks for re-opening, GitHub automatically closed it because of the associated PR!

This is the list of files that is still left:

build
├── CMakeLists.txt
├── unix
│   ├── check_dups_in_pcms.py
│   ├── compiledata.sh
│   ├── makedistsrc.sh
│   ├── makepchinput.py
│   ├── makereleasenotes.sh
│   ├── module.modulemap
│   ├── pandoc-jira.sh
│   └── rootmapcat.py
└── win
    ├── bindexplib
    │   └── bindexplib.cxx
    ├── cl.sh
    ├── f77.sh
    ├── ld.sh
    ├── makelib.sh
    ├── makeresource.sh
    ├── sehmap.h
    └── w32pragma.h

4 directories, 17 files
guitargeek commented 3 weeks ago

What is left now:

build
└── unix
    ├── check_dups_in_pcms.py
    ├── compiledata.sh
    ├── makedistsrc.sh
    ├── makepchinput.py
    ├── makereleasenotes.sh
    ├── module.modulemap
    ├── pandoc-jira.sh
    └── rootmapcat.py

2 directories, 8 files