-
Notifications
You must be signed in to change notification settings - Fork 160
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
Planning the features of HighFive v3. #864
Comments
Here's a sketch of how we'd need to reorganize the header for the first approach: #892 |
A thing to discuss is if you want to include H5Easy implemenations for Eigen, Boost, xtensor, openCV deeper in the core or not. |
Yes, this is one of the outstanding chores. It starts with #871 so that we can systematically test all combinations and can't make the Eigen mistake again. After that we reduce duplication in the tests #868 because I fear we'll soon slip into unmaintainable. Then one could start extending the trait So far we're not planning on anything too disruptive. Just rectifying error prone or quirky behaviour and fixing the build-system. Sometimes these can be fixed without actually breaking well-behaved code. |
Regarding Style. I much prefer splitting definition and declaration. However, the point isn't cosmetic. If one's unlucky and one needs to change which files includes which other files, then HighFive can be quite uncompromising. Since C++ does really allow fully cyclic code, it should always be possible to have the preprocessor figure out what to include in which order. However, the requirement for this work, is to split declaration from definition, like one does in regular C++ code (decl in Additionally, splitting the two will enable users to write code such as:
If someone really wants to reduce compile times it might help. It would also allow users to decide that they want to explicitly instantiate some of our templates and link to a "pre-compiled" HighFive. |
OK! However, making a major update is also a nice time to reflect on API changes if needed or desired. |
P.S. Concerning CMake I also link conda-forge/highfive-feedstock#41 |
A prime example why we need a relatively unexciting version 3.0.0 that just fixes the way dependencies are handled, fixes the CMake and doesn't break too much else. Moreover, it should be feasible with limited resources. Not so much a new version, but rather a set of improvements that unfortunately can't be done without them being breaking, and as a consequence the major version number gets bumped. |
if I've read everything correctly, splitting definitions and declarations will mean that HighFive will no longer be a header-only library, right? Why this choice? Do you have a date for the finalization of the v3? Let me know if I can help for CMake. |
HighFive will continue to be a header only library. In fact it'll make use of the fact that it's header-only more. Especially, in the CMake code. The splitting happens into separate header files: // file: highfive/H5File.hpp
#include "H5File_decl.hpp"
#include "H5File_impl.hpp" and: // file: highfive/H5File_decl.hpp
class File {
DataSet getDataSet(...);
};
// file highfive/H5File_impl.hpp
DataSet File::getDataSet(...) { std::cout << "Yay!"; } Then for extra points in pedantry, forward declarations (if added) need to be in a separate file (it's kinda uncommon though, so maybe we leave it off), and implementations of templates behave slightly differently from implementations of non-template functions. Hence, at it's most pedantic they'd get split into separate files too. The only difference to what we do now is that we stop tail including: // file: highfive/H5File.hpp
class File {
DataSet getDataSet(...);
};
#include "highfive/H5File_defn.hpp" The problem with this type of tail inclusion is that we can get only the declaration of
Thank you. We'll need testing in environments I'm unaware of and don't have easy access to via Github Actions. If you want to look at things way before they're ready for review see #897. In particular "Second:" in: No, HighFive doesn't have a schedule. We work on it whenever other projects take forever to compile. |
Thank you for these clarifications. |
We're done planning. |
This issue collects the features that we would like HighFive to have, but we can only do so by breaking API or build-systems. It is also an invitation for feedback from users of HighFive.
highfive/boost.hpp
would activate boost support. This is more similar to how Pybind11 and Boost handle dependencies.HighFive::boost
to activate boost support. This was proposed in the past: Switching to modern CMake #257 and discussed again here Allow HIGHFIVE_USE_INSTALL_DEPS only at install time #710.#include<boost/serialization/vector.hpp>
. #903.Small decided changes:
DataSpace
s, see Improve creating scalar and null dataspaces. #747.read
andwrite_raw
, see Addread_raw
and prepare to deprecateread(T*, ...)
. #928.FixLenStringArray
, see DeprecateFixedLenStringArray
. #906.inspector
, see Allow arrays with runtime defined rank. #918; and Pass dimensions to 'serialize'. #939, No constexpr rank via constexpr min-max rank. #938Changes that need review/discussion:
operator==
, see Support checking if two objects target the same thing #401.char[N]
warrant changing, see Datatype ofchar[][N]
. #865.H5P_DEFAULT
has the_hid
of a default constructedPropertyList
. Probably required for Manually setting properties of empty property lists. #786.The text was updated successfully, but these errors were encountered: