Skip to content

Commit

Permalink
iox-#910 Use diff for API changes in Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
dkroenke committed Sep 2, 2021
1 parent 53d9fe4 commit 040a2d1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 60 deletions.
104 changes: 46 additions & 58 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,20 @@ Rename utils to hoofs:

- in CMake you need now to find and link the package `iceoryx_hoofs` instead of `iceoryx_utils`

```cmake
# before
find_package(iceoryx_utils REQUIRED)
target_link_libraries(${target}
iceoryx_utils::iceoryx_utils)
# after
find_package(iceoryx_hoofs REQUIRED)
target_link_libraries(${target}
iceoryx_hoofs::iceoryx_hoofs)
```diff
-find_package(iceoryx_utils REQUIRED)
-target_link_libraries(${target}
- iceoryx_utils::iceoryx_utils)
+find_package(iceoryx_hoofs REQUIRED)
+target_link_libraries(${target}
+ iceoryx_hoofs::iceoryx_hoofs)
```

- the include paths for `iceoryx_utils` are now `iceoryx_hoofs`

```cpp
// before
#include "iceoryx_utils/cxx/string.hpp"

// after
#include "iceoryx_hoofs/cxx/string.hpp"
```diff
-#include "iceoryx_utils/cxx/string.hpp"
+#include "iceoryx_hoofs/cxx/string.hpp"
```

Refactoring SmartC:
Expand All @@ -71,59 +65,53 @@ Refactoring SmartC:
- Removed `getErrorString()` from posixCall, please use `getHumanReadableErrnum()` instead.
- Enhanced posixCall to handle a common case were multiple errnos are ignored just to suppress error logging

```cpp
// before
#include "iceoryx_utils/cxx/smart_c.hpp"

auto unlinkCallPublisher = iox::cxx::makeSmartC(
unlink, iox::cxx::ReturnMode::PRE_DEFINED_ERROR_CODE, {ERROR_CODE}, {ENOENT}, sockAddrPublisher.sun_path);

if (unlinkCallPublisher.hasErrors())
{
std::cout << "unlink error" << std::endl;
exit(1);
}

// after
#include "iceoryx_utils/posix_wrapper/posix_call.hpp"

iox::posix::posixCall(unlink)(sockAddrPublisher.sun_path)
.failureReturnValue(ERROR_CODE)
.ignoreErrnos(ENOENT, EBUSY) // can be a comma-separated list of errnos
.evaluate()
.or_else([](auto& r) {
std::cout << "unlink error " << r.getHumanReadableErrnum() << std::endl;
exit(1);
});
```diff
-#include "iceoryx_utils/cxx/smart_c.hpp"

-auto unlinkCallPublisher = iox::cxx::makeSmartC(
- unlink, iox::cxx::ReturnMode::PRE_DEFINED_ERROR_CODE, {ERROR_CODE}, {ENOENT}, sockAddrPublisher.sun_path);
-
- if (unlinkCallPublisher.hasErrors())
- {
- std::cout << "unlink error" << std::endl;
- exit(1);
- }

+#include "iceoryx_utils/posix_wrapper/posix_call.hpp"

+iox::posix::posixCall(unlink)(sockAddrPublisher.sun_path)
+ .failureReturnValue(ERROR_CODE)
+ .ignoreErrnos(ENOENT, EBUSY) // can be a comma-separated list of errnos
+ .evaluate()
+ .or_else([](auto& r) {
+ std::cout << "unlink error " << r.getHumanReadableErrnum() << std::endl;
+ exit(1);
+ });
```

A `ServiceDescription` is now only string-based and no more wildcards are allowed.
A well-defined `ServiceDescription` consists of three non-empty strings.

```cpp
// before
ServiceDescription(1U, 2U, 3U) myServiceDescription1;
ServiceDescription("First", "Second") myServiceDescription3;
ServiceDescription(iox::capro::AnyServiceString, iox::capro::AnyInstanceString, iox::capro::AnyEventString) myServiceDescription3;
```diff
-ServiceDescription(1U, 2U, 3U) myServiceDescription1;
-ServiceDescription("First", "Second") myServiceDescription3;
-ServiceDescription(iox::capro::AnyServiceString, iox::capro::AnyInstanceString, iox::capro::AnyEventString) myServiceDescription3;

// after
ServiceDescription("Foo", "Bar", "Baz") myServiceDescription1;
ServiceDescription("First", "Second", "DontCare") myServiceDescription2;
ServiceDescription("Foo", "Bar", "Baz") myServiceDescription3;
+ServiceDescription("Foo", "Bar", "Baz") myServiceDescription1;
+ServiceDescription("First", "Second", "DontCare") myServiceDescription2;
+ServiceDescription("Foo", "Bar", "Baz") myServiceDescription3;
```

The service-related methods have been moved from `PoshRuntime` to a separate class (TBD):

```cpp
// before
poshRuntime.offerService(myServiceDescription);
poshRuntime.stopOfferService(myServiceDescription);
poshRuntime.findService({"ServiceA", iox::capro::AnyInstanceString});
```diff
-poshRuntime.offerService(myServiceDescription);
-poshRuntime.stopOfferService(myServiceDescription);
-poshRuntime.findService({"ServiceA", iox::capro::AnyInstanceString});

// after
discoveryInfo.offerService(myServiceDescription);
discoveryInfo.stopOfferService(myServiceDescription);
discoveryInfo.findService("ServiceA", Wildcard);
+discoveryInfo.offerService(myServiceDescription);
+discoveryInfo.stopOfferService(myServiceDescription);
+discoveryInfo.findService("ServiceA", Wildcard);
```

## [v1.0.1](https://github.com/eclipse-iceoryx/iceoryx/tree/v1.0.0) (2021-06-15)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ Please make sure you have:
* Fine-tuning of external contribution e.g. running Axivion SCA
* Finish any missing implementations regarding the quality levels

As depicted below, after the release branch has been created the stabilisation phase will begin. After finishing the release, a git tag will be created to point to `HEAD` of the release branch. Follow-up releases will be branched off from the git tag.
As depicted below, after the release branch has been created the stabilization phase will begin. After finishing the release, a git tag will be created to point to `HEAD` of the release branch. Follow-up releases will be branched off from the git tag.

```
```console
o---o---o---o---o master
\
\ v1.0.0 v1.0.1
Expand Down

0 comments on commit 040a2d1

Please sign in to comment.