pitchfork
pitchfork copied to clipboard
No src directory in merged header placement mode?
Thanks for creating PFL! The merged header placement rules seem to overlap quite well with build2's canonical project layout. However, I notice two differences, in build2:
- the
src
project is omitted and the name of the project is used directly (skips one level of nesting). - The
tests
directory is only for functional/integration tests since tests are placed next to headers/sources in the merged mode.
Any thoughts on these?
My thoughts as an outsider:
- I was under the impression that
src
was used for source files and private headers. In that case there shouldn't need to be another subfolder - I don't know.
- This does seem reasonable, but I don't think pitchfork should allow for it. Pitchfork should not be a perfect fit for all existing layouts, but should be a single, mostly prescriptive layout. There is some variety in arrangement of headers and sources, but AFAICT, this is because there's really no consensus in the community on how to arrange them, and the different styles are fundamentally different. Having or not having a top level
src/
are practically the same, so allowing for both makes the project structure more complicated for (IMO) little benefit. - Yes, this is an excellent idea, which I believe is currently allowed, albeit somewhat underspecified. The merged test placement asks for unit tests to be in the same directory as normal source code. It's not 100% clear that integration or other kinds of tests should still be under the
tests/
directory, though.