Skip to content
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

Fix append mode double attributes #3

Closed
wants to merge 18 commits into from

Conversation

franzpoeschel
Copy link
Owner

Duplicate of openPMD#1302

@franzpoeschel franzpoeschel force-pushed the fix-append-mode-double-attributes branch from 719e8db to 2f56ac0 Compare July 15, 2022 13:53
franzpoeschel and others added 14 commits July 15, 2022 17:49
* Update catch2 to v2.13.9

* Add to changelog

* Docs: Catch2 2.13.9+

Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Adapt tests to BP5

Don't use parentheses in attribute names

Enable BP5 dtype tests

Add test for AppendAfterSteps in BP5
even if the specified directory does not exist
Needed later for checking file presence in parallel situations
@franzpoeschel franzpoeschel force-pushed the fix-append-mode-double-attributes branch from 4fe79e7 to 8315402 Compare July 19, 2022 08:57
@franzpoeschel franzpoeschel force-pushed the fix-append-mode-double-attributes branch 2 times, most recently from f5e511f to f329c8c Compare July 20, 2022 12:52
@franzpoeschel franzpoeschel force-pushed the fix-append-mode-double-attributes branch from f329c8c to 1b5b053 Compare July 20, 2022 13:19
jkelling pushed a commit to jkelling/openPMD-api that referenced this pull request Sep 7, 2024
* Remove: MPark.Variant (internal)

* CMake: C++17

* Docs: w/o MPark.Variant

* Docs: C++17

* Remove C++14-only Code

* Variant/Option: only `std::variant` as source

* CI: Clang 5->6, GCC 5->7

* Clang6: Ubuntu 20.04

The shipped libstd++ (GCC10?) does not seem to work well with Clang 6
on Ubuntu 18.04 - try again on Ubuntu 20.04.

* clang-tidy-10: namespace & nodiscard

C++17 modernizations that it found:
- `modernize-concat-nested-namespaces`
- `modernize-use-nodiscard`

* macOS: raise deployment target to 10.13

```
error: 'visit<(lambda at ...include/openPMD/backend/Attribute.hpp:239:9),
              std::variant<...> &>'
is unavailable: introduced in macOS 10.13
```

`std::filesystem` needs macOS 10.15:
```
share/openPMD/thirdParty/toml11/toml/parser.hpp:2166:65:
error: 'path' is unavailable: introduced in macOS 10.15
basic_value<Comment, Table, Array> parse(const std::filesystem::path& fpath)
                                                                ^
/Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/filesystem:902:24:
note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
```

* clang6 on Linux: use libc++

Issues with clang 6 on `<variant>` from GCC's libstdc++:
- https://stackoverflow.com/a/46507150/2719194
- https://bugs.llvm.org/show_bug.cgi?id=31852
- https://bugs.llvm.org/show_bug.cgi?id=33222

Using libc++:
- https://libcxx.llvm.org/UsingLibcxx.html

* Add a Clang 7 build

* add libc++abi-dev

* Clang 6: `-Wno-ignored-attributes -Wno-unused-const-variable`

clang-6 has a false positive on `src/auxiliary/Filesystem.cpp`
with `-Wno-ignored-attributes`:
```C++
[[maybe_unused]] MPI_Datatype const MPI_Types< unsigned >::value = MPI_UNSIGNED;
```

Adding only `-Wno-ignored-attributes` then leads to:
```
src/auxiliary/Filesystem.cpp:201:47: error: unused variable 'value' [-Werror,-Wunused-const-variable]
    MPI_Datatype const MPI_Types< unsigned >::value = MPI_UNSIGNED;
                                              ^
```

* README: C++17 Structure Bindings

Modernize "first read" C++ example with structured bindings

* Doc: Support Clang 7+

For `<variant>`, clang 6 is not to be recommended for C++17 compilation
unless by expert users that know how to change the stdlib.

Thus, let's only recommend Clang 7+.

Ubuntu 18.04 (bionic/oldstable) ships clang 6 by default, but
Ubuntu 20.04 (focal/stable) is already at clang 10.

* C++17: Replace auxiliary::Option with std::optional

* Replace auxiliary::Option with std::optional

* Remove SFINAE in some places (franzpoeschel#3)

* switchType: avoid SFINAE constructs

* Remove template specializations: oldCreateAttribute, oldReadAttribute

* CI fixes

Co-authored-by: Franz Pöschel <franz.poeschel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant