Closed ChemiCalChems closed 8 months ago
Alright, so I finally managed to get a check going for non-relative includes. As you can see, in fact, on commit 564aa19 the check failed because of a commit push to main
a couple of days ago that used the old include status quo in rfl/to_view.hpp
(this also serves on an example as to how the errors as shown in the workflow, so that's quite convenient) . I cherry-picked the commit and changed the include to be relative and now that check should pass.
This introduces a trivial merge condition, though, but oh well.
I'll add another commit with a section in the README stating includes should be relative for the well-being of the project and set the PR as ready for review.
I‘ll take a look later and then merge.
Decided to clean the history up a bit. Waiting for checks to pass, but everything should be fine.
@ChemiCalChems , is this ready to be merged?
Yeah, all ready to be merged. In the future, I'll try change this for a clang-tidy
check of some sort, but for now it'll do.
After some consideration as to the true meaning of issue #30, I think we misunderstood what the author of said issue, @vaijns, actually meant. In their original post they said
They are absolutely right that if an end-user of the library is to use it header-only or otherwise, they shouldn't need to accommodate to our internal practices of how we include files by setting an include directory in their build system. Our library should be build-system-agnostic in the sense that if the user include one of our files correctly, we should internally resolve that file without depending on any of their settings (ie. using relative includes).
As I said in my comment in #30
This is said PR.
To ease the task, I wrote this little Bash script (to be run from the
include
directory) which I will leave here for future documentation purposes (in case we have to do it again some time, though I hope not...):I ran
grep -R '#include "rfl'
from withininclude
and the only results that came up after my changes are ininclude/rfl.hpp
as it should be.I'm creating this as a draft since I want to add some documentation regarding this change in a new
How to contribute
section in the README, and I'd like to study whether I can write a Github Actions check for this.