compile-time-regular-expressions
compile-time-regular-expressions copied to clipboard
Headers installed without library prefix/decoration
We are trying to package ctre for build2 where, in order to allow multiple libraries to co-exist, we have rules a bit stricter than "install whatever you want anywhere you want under /usr/include". Specifically, we normally require the headers either to be decorated with the library name (or be the library name) or they must be installed into a subdirectory of /usr/include decorated with the library name (or be the library name). This way we can be reasonably sure that independent libraries won't overwrite each other's headers.
Looking at ctre, I see a few problems in this area:
-
There is the
unicode-db.hppheader and theunicode-db/subdirectory. In fact, this looks like an external library bundled withctre(@cor3ntin, perhaps it's this one https://github.com/cor3ntin/ext-unicode-db). If that's the case, would it make sense to unbundle it or at least make it possible to unbundle (e.g., by including upstream's headers as-is)? Alternatively, if unbundling is not a good idea, would it be possible to prefix the header/directory withctre(you would probably also want to prefix the namespace)? -
Similarly, there is
ctll.hppandctll/. I suppose we can let this one slide (at least it includes half of the library name) but it makes me wonder if this could/should be a separate library (author of issue #207 seems to think so).
Could someone clarify what's going on here and if there are any plans to address these issues?
Hi, you can easily take everything in single-header and place it with ctre/ prefix into /usr/include that's the intended usage anyway. The unicode-db was designed to be integrated with and used mostly by CTRE.
About unification of namespaces ... I would prefer ctre and ctll to be separated, I don't have an opionion about moving uni into ctre.
you can easily take everything in single-header and place it with
ctre/prefix into/usr/includethat's the intended usage anyway
That could work (we wouldn't even need the ctre/ prefix if we drop unicode-db.hpp -- not sure why it's exposed in single-header/). Tests would be a problem, however: some of them include individual headers rather than <ctre.hpp>.
I will change the tests.
unicode-db.hpp is there in case you already included ctre.hpp you can include only unicode-db.hpp
Thanks for the offer to change the tests.
Regarding unicode-db.hpp in single-header/: if it is part of the official interface, then we still have the naming issue. Do you think it would be possible to rename it to ctre-unicode-db.hpp or some such?