-
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
Potential regression when writing booleans #713
Comments
Thank you for reporting the issue. A quick look suggests that it might be related to the fact that we've fixed boolean support, in the same way you seem to have implemented it yourself (if I understand the snippet correctly). See,
Note that we've added a function This is just a hunch, and I'll look into it more carefully. |
@1uc ... thanks for the quick response! A clash of names with a newly introduced function does explain things. I have some initial evidence that renaming our function resolves the issue. I will report back once I see what our CI is doing. |
I verified that renaming the function resolves the issue. Thanks! |
Nice to hear it's resolved! I've checked that we namespace our register invocation:
I suspect (and hope) that fully naming the function when registering it would also work, e.g.,
|
@1uc ... yes, I can confirm that using the full name Update ... found the root cause for the remaining (now hidden below) - it's a configuration error on our side:
As 2.7.0 removes the need for us to implement `create_enum_boolean` ourselves, I started to experiment with the new capability. One issue I am currently running into is that
```c++
typedef HighFive::details::Boolean H5Boolean;
```
~works when I use the `conda` package, but it fails with the following error if I check out the git module with version `v2.7.0`:
```
error: no type named 'Boolean' in namespace 'HighFive::details'
```
(I am compiling on macOS)
As an aside, I believe the |
I am still wondering why using namespace HighFive; // this is nowhere defined in our code anywhere in our code. Is this a bug after all? Update: I ran into another failure with 2.7.0 (this time on a GitHub CI runner using MSVC toolset 14.1 - Visual Studio 2017 - that pulled HighFive from conda) see GH Action. Later versions of the MSVC toolset - 14.2 and 14.3 - do work. I believe that the newest standard you’re requiring is C++14 so I believe Visual Studio 2017 should work?
```
c:\miniconda3\envs\test\library\include\highfive\bits/H5Path_traits_misc.hpp(31): error C2248: 'HighFive::Object::Object': cannot access protected member declared in class 'HighFive::Object'
c:\miniconda3\envs\test\library\include\highfive\bits/H5Object_misc.hpp(27): note: see declaration of 'HighFive::Object::Object'
c:\miniconda3\envs\test\library\include\highfive\H5Object.hpp(53): note: see declaration of 'HighFive::Object'
c:\miniconda3\envs\test\library\include\highfive\bits/H5Path_traits_misc.hpp(19): note: while compiling class template member function 'HighFive::PathTraits::PathTraits(void)'
C:\Miniconda3\envs\test\Library\include\highfive/H5Attribute.hpp(124): note: see reference to function template instantiation 'HighFive::PathTraits::PathTraits(void)' being compiled
C:\Miniconda3\envs\test\Library\include\highfive/H5Attribute.hpp(45): note: see reference to class template instantiation 'HighFive::PathTraits' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\include\filesystem(2392): note: see reference to class template instantiation 'std::chrono::time_point' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\include\type_traits(616): note: see reference to class template instantiation 'std::basic_string_view>' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\include\xstring(2124): note: see reference to class template instantiation 'std::is_convertible>>' being compiled
with
[
_StringViewIsh=const wchar_t *
]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\include\xstring(2122): note: see reference to variable template 'const bool conjunction_v > >,std::negation > >' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\include\xstring(2281): note: see reference to alias template instantiation 'std::basic_string,std::allocator>::_Is_string_view_ish<_StringViewIsh>' being compiled
with
[
_StringViewIsh=const wchar_t *
]
```
|
First regarding
When performing:
it'll expand to:
which means that since
would protect from this issue since it would expand to:
which should refer to the function defined in global scope. What makes me skeptical of my explanation is that you state that it's compiler dependent. |
Hi @1uc ... thanks for your explanations. Yes, Regarding some of the other issues I mentioned, I believe I tracked one down on my side, while the compiler dependence is really only limited to MSVC - it likely is related to some of the new issues and PR's that I saw popping up. |
Yes, there's a good chance you'll see issues related to macros clashing. However, the CI you linked contained something else too. Can we continue that discussion here #724? |
Describe the bug
A recent update (2.7.0?) appears to be have broken the ability of writing boolean attributes;
the breakage appears to be limited to the conda package, as I am unable to reproduce it with the main branch.To Reproduce
Among other data types, we use HighFive to write attributes containing booleans and boolean arrays. We use the following approach:
which is used to eventually either write a scalar
bool bValue
or a
vector<bool> bValue
In either case the following error is thrown when attempting to write:
Expected behavior
Until March 31st, the above code worked for both conda package and compilations using the HighFive git submodule.
At this point, it still works for the current main (559bd85), but fails as described above for the conda package.… update: after fixing a clash of function names (see thread below), the main branch no longer works.Desktop (please complete the following information):
Additional context
The problem may be limited to the conda package on
conda-forge
, with the following detailsThe text was updated successfully, but these errors were encountered: