-
Notifications
You must be signed in to change notification settings - Fork 31
Make project header only #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
neatudarius
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wusatosi , I think we discussed and decided not to do this. Please check sync notes.
Also, check with @bretbrownjr about bemanproject/beman#93.
Temporary blocking this PR.
|
@neatudarius yeah I think we discussed this before as well. But I remember the outcome to be neutral. I did look through the meeting minutes, this is the only piece I found to be potentially relevant to this.
From usage experience, projects usually start off as header only and rarely use the |
|
I don't think this change is a good fit for us. At least some projects would need to provide symbols, so we'd have to support a source directory in the template anyway. A "header only" option could be added on top, that would only lead to additional complexity... we would have to have a user-facing option to make this choice, conditionals in the templating logic to respect the option, and presumably additional complexity in the testing surface to make sure we cover where this choice intersects with other choices. In particular, CMake style changes with header-only libraries (i.e., I'm willing to discuss any idea, including this one. But keep in mind we have more essential important project structure decisions to focus on for now (see #92, #105, #115) that we should prioritize first. Aside: On header only libraries in Beman Beyond supporting header-only in the project template, I'm also against header only libraries for Beman libraries altogether. Normally I'm in favor of letting library authors have creativity as long as it's good for users and not disruptive to the rest of the ecosystem, but I don't expect those outcomes here. To be more specific:
Given all that, I don't see having (in some cases) a basic |
|
Hey @bretbrownjr , I am unfortunately (after learning so much from all the CMake related threads, maybe fortunately) not a CMake guru, and I agree with you this is very minor in comparison to other ambitions we have. I am not arguing against header only projects. I am not advocating to make header only library the requirement in beman. This PR is just to switch to it as default. The motivation is to reduce starting friction, as I have seen frustration from people trying to launch some new library using exemplar. I believe moving the Well, maybe it is a sign that we desperately needs templates, and the time we spent on writing this should be on envisioning how we want to approach templating. Let's halt this discussion for now. |

From usage experience, subsequent project usually only put source code in
includedirectory and not touch thesrc/folder.Having current
src/folder increase setup friction, as there's an extra emptysrc/beman/{NAME}/{NAME}.cppfile that needs to be updated when adopting as subsequent library, and users doesn't realize there's another CMake file under the folder.I don't think we should endorse header only library, but I think this is the common case.
This does conflict with #104 , @bretbrownjr