Skip to content

Commit

Permalink
[ci-skip] Merge branch 'Release-3.8' (#974)
Browse files Browse the repository at this point in the history
* Default any map type (#844)

* Fixed undefined behavior in Any::operator==(value)

* Revert "Fixed undefined behavior in Any::operator==(value)"

This reverts commit 3066fe1.

* Default AnyMap(map_type) constructor

to UNORDERED_MAP_CASINSENSITIVE_KEYS

* Remove CoreBundleContext.dataStorage clear (#845)

Fixes #733

* Removing std::move use with const object [ci skip] (#848)

* Removing std::move use with const [ci skip]

Signed-off-by: Tahar Touati <touati.thr@gmail.com>

* Addressing PR feedback, removing const from complex types and adding
std
move back [ci skip]

Signed-off-by: Tahar Touati <touati.thr@gmail.com>

---------

Signed-off-by: Tahar Touati <touati.thr@gmail.com>

* [ci skip] Update Changelog for #845 (#847)

* Update Chagelog for #845 [ci skip]

* Update Changelog Unreleased section [ci skip]

Signed-off-by: ShivamNegi <shivamnegi2019@gmail.com>

---------

Signed-off-by: ShivamNegi <shivamnegi2019@gmail.com>

* Fix warning "Use of BITWISE AND to check if a flag is set" (#849)

Signed-off-by: Tahar Touati <touati.thr@gmail.com>

* include cstdint in FileSystem.cpp (#850)

vcpkg installation is failing, with this error: 

PATH/v3.6.0-e25b133cd3.clean/util/src/FileSystem.cpp:122:3: error: ‘uint32_t’ was not declared in this scope

PATH/v3.6.0-e25b133cd3.clean/util/src/FileSystem.cpp:71:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?

Sure enough, when patched with this it will build and install correctly with vcpkg. Other errors are reported but this is the culprit.

* Fixes #840: removes manual reference counting (#841)

* converted registration

* compiled, not passeD

* fixed weak_ptr error, now leaking mock objects

* fixed bug, need to decrement ref count

* updats from last week, test cases failing because of out of date expectations

* all tests are passing with shared and weak pointers to serviceRegistrationBasePrivate

* still passing tests, updated comments and cleaned up

* updating to share dependents

* new issue with dying service

* added coreInfo, maybe passing

* passing tests, removed manual ref counting from referenceBasePrivate, repeated all fast tests to ensure no sporadic failures

* updated comments

* updates before PR

* Removed manual reference counting

The manual reference counting in ServiceRegistrationBasePrivate and ServiceReferenceBasePrivate were removed. Additionally, some properties of ServiceRegistrationBasePrivate were offloaded to a new class ServiceRegistrationCoreInfo which both ServiceRegistrationBasePrivate and ServiceReferenceBasePrivate can access allowing ServiceReferenceBasePrivate to give up ownership of ServiceRegistrationBasePrivate.

Signed-off-by: Toby Cormack  <tcormack@mathworks.com>

* Removed manual reference counting and merged with upstream (#840)

The manual reference counting in ServiceRegistrationBasePrivate and ServiceReferenceBasePrivate were removed. Additionally, some properties of ServiceRegistrationBasePrivate were offloaded to a new class ServiceRegistrationCoreInfo which both ServiceRegistrationBasePrivate and ServiceReferenceBasePrivate can access allowing ServiceReferenceBasePrivate to give up ownership of ServiceRegistrationBasePrivate.

Signed-off-by: Toby Cormack  <tcormack@mathworks.com>

* ServiceRegistrationCoreInfo now default destructor

* Updated based on Patty's comments #840

* updated ServiceReferenceBase Constructors for clarity with shared_ptrs

* removed 'move' from serviceRegistry

* attempt at solving mac issue

* updates for lock type and removing unneccessary functions from reference

* lost lock

* changed to custom atomic load

* LockSet addition

* threading support in LockSet

* LockSet not threaded

* no names in func dec

* Incoorporated Jeff's Comments

* Assignment operator didn't fail on my computer, did in github

* updated for Jeff's 5/16 comments

* clang update

* mikes comments and fixes for multithreaded support

* remove ifdefs from BundleRegistry, abide by rule of (0,3,5), and add comments

---------

Signed-off-by: Toby Cormack  <tcormack@mathworks.com>

* Fixes #852: adds a [[nodiscard]] to BundleContext::RegisterService (#863)

* noDiscard update first push

* Jeff's comments, c++14 in cmakelists for makefile test, comments to reference nodiscard

* [ci skip] Updated README to reflect correct compiler/OS versions (#862)

[ci skip]

* Fix code scanning alerts (#861)

Fixes #860, #859, #858, #857, #856, #855, #853

* Ensure multiple listeners for the same factory PID are honoured by `ConfigurationNotifier::AnyListenersForPid` (#865)

* Ensure multiple listeners for the same PID are honoured

Signed-off-by: Conor Burgess <Burgess.Conor@gmail.com>

* Fix formatting

Signed-off-by: Conor Burgess <Burgess.Conor@gmail.com>

---------

Signed-off-by: Conor Burgess <Burgess.Conor@gmail.com>
Co-authored-by: cburgess <cburgess@mathworks.com>

* Code scanning alert fix: Use of a moved from object #864 (#866)

Fixes #864 

* tests passing on linux, all files updated

* Mike and Toby backat it again

* changed second instance of warning?

* reverted naming, final submit

* Fix race condition when concurrently adding to SCRExtensionRegistry (#870)

* Fix race condition when concurrently adding to SCRExtensionRegistry

Fixed a race that can happen when multiple threads are trying to add to the extension registry container.

Fixed a bug with the tests for SCRExtensionRegsitry class never being compiled and run.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Fix #868: Recoups some of performance losses from PR #841 (#869)

* fixed lockReg shared_ptr

* down to 5% increase from original

* get logs from github to verify behavior

* reverting performance yml and adding move constructor (default) for RegistrationLocks
:

* #Issue873: Redundant calls to .Load() (#874)

* first commit

* test Case

* revert test

* test fix

* naming

* Fixes #718 (#876)

Signed-off-by: Toby Cormack <tcormack@mathworks.com>

* Fix #489 - Char Const* property (#877)

* Added case for char const*

Signed-off-by: tcormack <tcormack@mathworks.com>

* formatting

---------

Signed-off-by: tcormack <tcormack@mathworks.com>

* Fix #879 Change TPP extensions (#880)

Signed-off-by: tcormack <tcormack@mathworks.com>

* Fix #881

Reformat `.hpp` files with Clang

* Fix #846 (#878)

* firstCommit

* events is all wait for false flags

* removed txt files

Signed-off-by: tcormack <tcormack@mathworks.com>

* serviceTracker tsan fixes

Signed-off-by: tcormack <tcormack@mathworks.com>

* deleted txt

Signed-off-by: tcormack <tcormack@mathworks.com>

* tsanSupppressions updated for various tests

Signed-off-by: tcormack <tcormack@mathworks.com>

* removed text files

Signed-off-by: tcormack <tcormack@mathworks.com>

* removed test

* added comment

Signed-off-by: tcormack <tcormack@mathworks.com>

* updated suppresssions file with commentss

* add sleep to stop spin

* add unused flag to lock

Signed-off-by: tcormack <tcormack@mathworks.com>

* revert reformat

* formatting

* formatting

* reformat

* updating comments

* update comment

---------

Signed-off-by: tcormack <tcormack@mathworks.com>

* Fix #710 ServiceTracker TSAN warnings (#883)

* fixed tracker race

* fixing tsanSupp

* fixing tsan mistakes

* fixed tracker race

* tsan_suppresssions mistype

* fixed comments

* typos

* Fix #872 (#875) Remove Statics in MultipleListenersTest.cpp and ServiceHooksTest.cpp

Signed-off-by: tcormack <tcormack@mathworks.com>

* Remove unwanted branches from workflow (#902)

Co-authored-by: aadityap <aadityap@mathworks.com>

* Fix #920 serviceTracker segfault on concurrent `tracker.Close()` and `framework.Stop()` (#922)

Signed-off-by: tcormack <tcormack@mathworks.com>

* Add condition on development branch (#916)

* Add condition on development branch

Signed-off-by: The MathWorks, Inc. aadityap@mathworks.com
Co-authored-by: aadityap <aadityap@mathworks.com>

* Fix #926 Custom CppMicroServices Boost Namespace (#929)

Signed-off-by: tcormack <tcormack@mathworks.com>

* Update 3rd party dependencies to versions from c++14-compliant branch (#930)

* update googletest to release 1.14.0

* update spdlog to version 1.12.0

* update boost nowide to latest commit from standalone branch

* update absl to Abseil LTS 20230125.3

* Updated amalgamated jsoncpp to 1.9.5

This also fixes compiler warnings

Signed-off-by: Ingmar Sittl <ingmar.sittl@elektrobit.com>

* Upgrade miniz to 3.0.2 release

Signed-off-by: Ingmar Sittl <ingmar.sittl@elektrobit.com>

---------

Signed-off-by: Ingmar Sittl <ingmar.sittl@elektrobit.com>

* Fix issues with gcc-12 and clang-16 (#932)

* Remove unused variable to fix clang-16 warning
* Addd missing include when using libstdc++ headers from gcc-12

Signed-off-by: Ingmar Sittl <Ingmar.Sittl@elektrobit.com>

* Fix Redundant Bundle Validation checks (#921)

Signed-off-by: Shivam Negi <snegi@mathworks.com>

* Fix #913 ServiceTracker deadlock (#915)

Signed-off-by: tcormack <tcormack@mathworks.com>

* Adding support for multiple cardinality for service references. (#871)

* Adding support for multiple cardinality for service references. Signed-off-by: The MathWorks, Inc. mphadnis@mathworks.com

* Fixing build failures on Linux/Maci platform

* Addressing feedbacks: minor code changes + modifications in unitttests. Signed-off-by: The MathWorks, Inc. <mphadnis@mathworks.com>

* Modified test point to check for compile time errors. Fixed formatting in test file. Signed-off-by: The MathWorks, Inc. mphadnis@mathworks.com

* Changes to automate existing ServiceComponent tests using CMake as compile-only tests. Signed-off-by: The MathWorks, Inc. mphadnis@mathworks.com

* Fixing clang formatting for test files. Signed-off-by: The MathWorks, Inc. mphadnis@mathworks.com

* Improvising compile time tests based on feedbacks. Signed-off-by: The MathWorks, Inc. mphadnis@mathworks.com

* Added doxygen comments to new methods in ReferenceManager Signed-off-by: The MathWorks, Inc. mphadnis@mathworks.com

---------

Co-authored-by: mphadnis <mphadnis@mathworks.com>

* Fix #938 Boost namespace Versioning and remove absl dependency (#939)

* Revert "Fix #926 Custom CppMicroServices Boost Namespace (#929)"

This reverts commit aab89e3.

Remove commit to reset to original boost namespace

* Change Cmake Infrastructure to allow custom Boost library use and remove old commit that changed boost namespace

* abseil dependency removal

* fix double forward -- maybe, this may be slow

* references instead of copies

* cmake update

* Fix #937 `GetServiceReferences` ordering guarantee (#943)

Signed-off-by: tcormack <tcormack@mathworks.com>

* BundleTracker Implementation (#726)

* Bundle tracker (#709)

* BundleTracker stubs

* Generalize BundleAbstractTracked

* Implement BundleTracker

* Implement BundleTracker in DeclarativeServices using raw pointers

* Use std::optional in BundleTracker API

* BundleTracker template instantiations

* Create initial tests

* Move BundleTrackerTest.cpp

* Update BundleTrackerTest.cpp

* Implement TestGetTrackingCountClosed

* Implement GetTrackingCount tests

* Modify tests relating to unknown expected behavior

* Implement TestGetTracked and TestOpenOpened

* Update build_and_test_windows.yml

* Implement and update tests

* Update tests

* Use shared ptr for BundleTrackerCustomizer

* Implement and update tests

* Implement and update tests

* Rename method test file and fixture

* Update method tests

* Add TODOs

* Add branch to ci

* Update CXX_STANDARD to 17 for doc

* various fixes

* Update CMakeLIsts

* Create BundleTrackerCustomCallbackTest.cpp

* Implement and update custom callback tests

* Update build_and_test_nix.yml

* Update custom callback tests

* Implement test subset

* Resolve cross-platform build issues

* Implement and update tests

* Implement and update tests

* Further CI fixes

* Update method tests

* Update method tests to handle build shared libraries off

* Update custom callback tests to handle build shared libraries off

* Implement CreateStateMask variadic

* Implement and update method tests

* Implement test

* Update tests to use state mask creator

* Implement custom callback tests

* Create concurrency tests

* Use std::optional for GetObject

* Update custom callback tests

* Ignore bundleEvents without state changes

* Use std::optional for GetCustomizedObject

* Update GetObject test

* Do not imply implicit cast from std::optional

* Update custom callback tests

* Add lock checkout for Remove()

* Update method tests

* Update tests

* Hide _CreateStateMask

* Remove DS integration

* Snap changes

* Implement concurrency tests

* Amend CreateStateMask

* Update CreateStateMask calls

* Change .yml files

* Update formatting

* Update tests

* Move listener removal inside syncronised region

* Add BundleTracker to workflow

* Additional standardization

* Drop workflows changes

* Implement performance tests

* Update tests with unclear expectations

- Adds comments explaining the EXPECT_CALL statements expecting any number of RemovedBundle callbacks
- Updates where the expected behavior of "Close() calling RemovedBundle on tracked bundles" is tested, also adding a comment to make this fact clear

* Add newline at end of file

* Review updates

* Change API types

* Avoid frivolous using statements in BundleTracker

* Remove BundleTracker tpp file

* Add forward declarations

* Clear cross-platform build warnings

* Bundle-Tracker OSGi TrackingCount behavior

* Remove implementation tpp files

* Adjust TrackingCount() based on 702

Co-authored-by: shane-riley (The Mathworks Inc.) <sriley@mathworks.com>
Co-authored-by: xru192 <ryanxu123@gmail.com>
Co-authored-by: xru192 <56376151+xru192@users.noreply.github.com>
Co-authored-by: Alexander Christoforides <38366659+achristoforides@users.noreply.github.com>

* Upgrade jsoncpp (#773)

Fixes #772 

Upgrade version of jsoncpp to 1.9.5 to include fix for deprecated sprintf usage.

Upgrading introduced a new unneeded-internal-declaration warning which is set as a warning instead of error.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Co-authored-by: Jeff DiClemente <jdicleme@mathworks.com>

* Fixed sporadic race conditions during framework shutdown (#725)

Fixed a number of races that can occur while one thread is performing various framework operations and another thread is shutting down the framework.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Co-authored-by: Jeff <DiClemente>

* Fix race that results in a missed config updated event (#727)

* Fix race that results in a missed config updated event

Fixed races that can cause a ManagedService or ManagedServiceFactory to miss being called when a configuraiton object is updated.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Update ComponentInstanceImpl.hpp (#724)

* Update ComponentInstanceImpl.hpp

Improve error message that is generated when an appropriate constructor isn't found for the Service Instance. 

Signed-off-by, The MathWorks, Inc. <pelliott@mathworks.com>

* Factory Configuration Bug Fix (#731)

* Factory Configuration Bug Fix

When factory configurations are created before the bundle containing the factory component is installed and started, DS should find those configurations in the Configuration Admin repository and register them as part of the factory component startup. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Factory Configuration Bug fix

Addressed code review feedback. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Update ComponentConfigurationImpl.cpp

Fixed compilation failure in Ubuntu Minimum Gcc build. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Update TestFactoryPid.cpp

Change auto const to constexpr. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Revert PR #713 (#744)

This change is causing an untenable amount of noise in log output. Backing out for now. A better solution to the problem of logging service dependency errors is needed.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Update version numbers for cppms upgrade (#748)

Update version numbers for cppms upgrade to version 3.7.4. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Fix deadlock in ConfigurationAdminImpl::RemoveConfigurations (#745)

* Fix deadlock in ConfigurationAdminImpl::RemoveConfigurations

This is a fix for a deadlock bug caused by the WaitForAllAsync in ConfigurationAdmin::RemoveConfigurations.
The Use Case is as follows:
     A configuration object is defined in the manifest.json file.
      The User's main thread stopped the bundle which causes
         the ConfigurationAdminImp::RemoveConfigurations
         method to remove the configuration object from the
         ConfigurationAdmin repository and to send an Updated
         notification to the service instance.
         RemoveConfigurations would then execute a
         WaitForAllAsync to wait for all asynchronous threads to
         complete including the asynchronous thread that was
         launched as part of the Updated  notification.
      The user's Updated method also tried to stop the bundle.
      This means that it had to wait for the
      RemoveConfigurations method to complete.
      Each thread was waiting for the other to complete.
This fix removes the WaitForAllAsync and adds a test case to confirm the deadlock is gone. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Fix compiler error

Fix compiler error in Minimum Gcc build. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Change ConfigAdminTests.testManagedServiceRemoveConfigurationsDeadlock

Change ConfigAdminTests.testManagedServiceRemoveConfigurationsDeadlock so that it more closely matches the use case that caused the deadlock. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Update TestConfigAdmin.cpp

testManagedServiceRemoveConfigurationsDeadlock test. Changed Updated method to make sure that it only stops the bundle containing the cm.testdeadlock configuration object. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Update TestConfigAdmin.cpp

Added error checking for the Updated method used in testManagedServiceRemoveConfigurationsDeadlock. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* configurations using the same pid are not updated properly (#754)

* configurations using the same pid are not updated properly

Fixed an issue whereby re-using a configuration pid did not cause the configuration to be sent to the ManagedService/ManagedServiceFactory correctly.

* Remove last change count instead of setting it to zero

Co-authored-by: jdicleme <jdicleme@mathworks.com>

* Ensure ~SCRBundleExtension does not throw (#761)

* Ensure ~SCRBundleExtension does not throw

It's possible for the bundle to be stopped before ~SCRBundleExtension accesses the bundle, causing an exception to be thrown and an abort. This change ensures the destructor does not throw.

* Fix valgrind errors

Moved cleanup of SCRBundleExtension members to make sure these objects are destroyed when an exception is thrown from DisableAndRemoveAllComponentManagers.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Fix valgrind error

Missed another error path where cleanup is necessary

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Co-authored-by: jdicleme <jdicleme@mathworks.com>

* clang-format ran for all files (#759)

Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>

Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>

* Rev DS and ConfigAdmin versions for release (#762)

prepare ds and configadmin for a bug fix release

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Co-authored-by: jdicleme <jdicleme@mathworks.com>

* Clang-format git hook pre-commit enforcement (#760)

* Added clang-format git pre-commit hook

Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>

* Updated README

* Updated help instructions to include '--style=file'

* Added '--style=file' flag in actual pre-commit hook check

* Updated README

* Removed unnecessary code in pre-commit hook

* Updated README

Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>

* Update changelog [ci skip] (#765)

* Update Changelog to include missing changes [ci skip]

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* rebase onto development.

* Fix broken static build configurations on macOS (#774)

* Fix broken static build configurations on macOS

Fixes #738

Removed the ability to append ZIP files to the end of archives files for all supported OS platforms. Specifically the clang linker no longer tolerates linking archive files with arbitrary data appended to the end.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Fix examples tests

the tutorial example has tests which use an installed CppMicroServices SDK to test whether the example code can be compiled using the SDK. In this case, the CppMicroServices target property doesn't have the path to the metadata zip set.

To resolve this issue:
1. install the metadata zip files alongside the static libraries for all CppMicroServices components only if building static libraries.
2. Set this property for cases where the CppMicroServices SDK is used by downstream clients.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Co-authored-by: Jeff <DiClemente>

* Support arm64 on macOS (#778)

Fixes #674 

Add support for arm64 on macOS

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Performance improvement from `brian-performance` branch (#728)

* Prototype performance improvements

* Reverted AnyMap hash change

Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>

* Fixed unused variable warnings

* Made changes requested by reviewers

* Made changes requested by reviewer

* Back out a performance improvement

Backing out a performance improvement as it creates a deadlock caused by mutex order locking.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>
Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Co-authored-by: BrianWeed <brian_weed@yahoo.com>
Co-authored-by: jdicleme <jeffdiclemente@users.noreply.github.com>
Co-authored-by: Jeff <DiClemente>

* Fix ub in any (#777)

* Fixed undefined behavior in Any::operator==(value)

* Revert "Fixed undefined behavior in Any::operator==(value)"

This reverts commit 3066fe1.

* Fixed undefined behavior in Any::operator==(value)

* removed unnecessary forward declaration.

* Fixed undefined behavior in Any::operator==(value)

* removed unnecessary forward declaration.

* Fix race with DS service object construction (#801)

* Fix race with DS service object construction

A race occurs when DS is constructing a service object with injectable mandatory service dependencies whereby any bound service dependencies could no longer be available because another thread unregistered any of the bound service dependencies.

Given that a ComponentContext is constructed only after all the service dependencies has been satisfied, if during ComponetContext construction any of the bound service dependencies are no nullptrs then throw and fail to construct the service object. This fixes a failure mode where a service constructor can be called with a nullptr service object when the service dependency is defined as mandatory and injection is true.

Also noticed that one of the test bundle project was exceeding the path limit on Windows, so shortened the project name to mitigate that problem.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Add more tests

Added more tests and fixed up some error messaging

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

---------

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Make a small performance improvement (#808)

stop copying the std::pair in the range-based for. This helps improve the speed of RegisterService

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Nested ldap queries (#794)

Added the capability to do ldap queries with nested keys.

Queries are first checked against the compound key and if a value is found it is returned.

If a value is not found, the key is split into segments on the "." character and then the AnyMap is "walked down" to look for a path to the value in sub-maps addressed by the segments of the key. So, if the value of the key "a.b.c" is queried,

1. Split the key into ["a","b","c"]
2. Check the top level map for a sub-map at key "a". If one is found, look in that map for a key "b" with a sub-map, and in that sub-map for a value with key "c". If found, return it.
3. If the top level map does NOT contain a key "a", look for a sub-map at key "a.b". If one is found, look in that sub-map for a value with a key of "c". If one is found, return it.
4. continue this algorithm down as many levels as there are segments until either the value for the last segment is found (in which case it is returned), or one is not found, in which case the lookup fails.

* clang-tidy improvement for CMakeResourceDependencies (#812)

CMakeResourceDependencies is often built by CMake in the context of
users of CppMicroServices - if you've configured clang-tidy to run in
the user project, it complains about the "old-style" constructor and
requests a modernized "= default".

Use --std=c++17 as minimum compile flag for explicit compilation of
this file for MacOS.

Signed-off-by: Ingmar Sittl <Ingmar.Sittl@elektrobit.com>

* [ci skip] Update CHANGELOG.rst (#817)

* [ci skip] Update CHANGELOG.rst

[ci skip] Fixed 3.7.4 release notes

* Update CHANGELOG.rst

* [ci skip] Update release information for version 3.7.5 (#818)

[ci skip]
update versions and changelog

* Updated MSVC Analysis to 0.1.1 and checkout to v3 (#824)

* Nested ldap queries (#811)

* disable support for nested filtering

set -DSUPPORT_NESTED_LOOKUP to re-enable the algorithm.

* Added comment describing enabling nested ldap queries.

---------

Co-authored-by: Alexander Christoforides <38366659+achristoforides@users.noreply.github.com>

* Add benchmark test infrastructure to DS (#813)

* Added benchmark suite for DS

- Added benchmark test for GetService for service provided by DS

Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>

* Removed unnecessary lines from CMakeLists.txt for DS benchmark tests

* Trying again

* Refactored DS test directory to mimic 'framework' test structure

* Fixed shadowed function

* Actually fix the function shadowing this time?

* Removed unnecessary bundles/link-time deps

* Updated CHANGELOG.rst

---------

Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>
Co-authored-by: alchrist <alchrist@mathworks.com>

* Upgrade Build: Add Ubuntu 22.04, remove Ubuntu 18.04 (#810)

Fixes #758

* Automate Performance Testing and Deploy Results (#829)

* Create performance_windows.yml

Adding new workflow for running performance tests

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Using personal token

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Revert "Using personal token"

This reverts commit d672a80.

* Uploading results to fork

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* removing https

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Changing ph branch

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Trying to deploy on another branch

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Commit results to gh-pages branch

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Added Performance Badge

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Added target for performance badge

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Update performance_windows.yml

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Removing hardcoded paths

- Using ENV instead of hard coded build paths
- Increased threshold to 20%

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Removed Cache operation

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Removing performance branch from workflow

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

* Name changed to CppMicroServices Benchmarks

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>

---------

Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>
Co-authored-by: Aaditya <aadityap@mathworks.com>

* [ci skip] Update CHANGELOG.rst (#832)

[ci skip]
bring change log up to date with latest commits on the development branch

* Fix undefined behavior in LDAPExpr::Trim (#835)

if there is no space in the string on the second str.erase, calling
str.find_last_not_of() returns std::string::npos. Trying
to add 1 to npos leads to undefined behavior reported by UBSAN.

Signed-off-by: Ingmar Sittl <ingmar.sittl@elektrobit.com>

* Brian decl services (#833)

* Performance micro-optimizations

Signed-off-by: The MathWorks, Inc. <bweed@mathworks.com>

* Fix formatting

* More performance improvements

* fixed up compilation errors.

* deal with unused variable.

* restore API

ServiceRegistrationBase::SetProperties(ServiceProperties const&)

---------

Signed-off-by: The MathWorks, Inc. <bweed@mathworks.com>
Co-authored-by: Michael Carney <mike@carneyweb.com>

* Update CHANGELOG.rst [ci skip] (#837)

[ci skip]
added #833

* ComponentManagermemory reallocation bug fix (#834)

* ComponentManagermemory reallocation bug fix

The ComponentManagerImpl object contained a shared_ptr to the vector of all ComponentManagerImpl objects. When adding an item to this vector, the resizing of the vector caused a memory allocation error. Fixed by removing the vector from the ComponentManagerImpl object.

* Fix for ConfigurationNotifier::CreateFactoryComponent memory allocation error

When a ComponentManager is created, it must be added to the managers map in SCRBundleExtension. This is necessary so that when the bundle is stopped, the ComponentManager can be destroyed.
The old code was holding a shared_ptr to the managers map in the ComponentManagerImpl object. This caused a memory reallocation error when a ComponentManager was added to the map and the map needed to be resized.
This fix adds an AddComponentManager method to the SCRBundleExtension object so that CreateFactoryComponent can add a manager to the managers map when it is created. In order to find the SCRBundleExtension, the map of SCRBundleExtensions was moved out of SCRActivator and into a new class called SCRExtensionRegistry.

* Rest of the ConfigurationNotifier fix

Signed-off-by: The MathWorks, Inc. <pelliott@mathworks.com>

* Fix errors in minimum gcc build

Signed-off by: The MathWorks Inc. < pelliott@mathworks.com>

* Responded to code review comments

Responded to code review comments. Added tests for SCRBundleExtension and SCRExtensionRegistry. Signed off by - The MathWorks, Inc. <pelliott@mathworks.com>

* Update ConfigurationNotifier.cpp

Update error message. Signed off by The MathWorks, Inc. <pelliott@mathworks.com>

* Update SCRExtensionRegistry.hpp

Formatting issue. signed-off by The MathWorks, Inc. <pelliott@mathworks.com>

* CreateFactoryComponent changes

ConfigurationNotifier::CreateFactoryComponent will log an exception if it can't find the SCRBundleExtension in the ExtensionRegistry instead of throwing a std::runtime_error exception. Signed-off-by: The MathWorks, Inc. <pelliott@mathworks.com>

* Update ConfigurationNotifier.cpp

Fixed call to std::exception. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>

* Update ConfigurationNotifier.cpp

Removed throw in CreateFactoryComponent. Error message is already logged, no throw needed. Signed-off-by - The MathWorks, Inc. <pelliott@mathworks.com>

---------

Signed-off-by: The MathWorks, Inc. <pelliott@mathworks.com>

* [ci skip] Update CHANGELOG.rst (#839)

[ci skip]
Added bug fix to fix sporadic crash in DS caused by concurrent access to ComponentMgrImpl vector.  Pull Request 834.

* [ci skip] rev version (#842)

Co-authored-by: Jeff DiClemente <jdicleme@mathworks.com>

* Default any map type (#844)

* Fixed undefined behavior in Any::operator==(value)

* Revert "Fixed undefined behavior in Any::operator==(value)"

This reverts commit 3066fe1.

* Default AnyMap(map_type) constructor

to UNORDERED_MAP_CASINSENSITIVE_KEYS

* Remove CoreBundleContext.dataStorage clear (#845)

Fixes #733

* Removing std::move use with const object [ci skip] (#848)

* Removing std::move use with const [ci skip]

Signed-off-by: Tahar Touati <touati.thr@gmail.com>

* Addressing PR feedback, removing const from complex types and adding
std
move back [ci skip]

Signed-off-by: Tahar Touati <touati.thr@gmail.com>

---------

Signed-off-by: Tahar Touati <touati.thr@gmail.com>

* [ci skip] Update Changelog for #845 (#847)

* Update Chagelog for #845 [ci skip]

* Update Changelog Unreleased section [ci skip]

Signed-off-by: ShivamNegi <shivamnegi2019@gmail.com>

---------

Signed-off-by: ShivamNegi <shivamnegi2019@gmail.com>

* Fix warning "Use of BITWISE AND to check if a flag is set" (#849)

Signed-off-by: Tahar Touati <touati.thr@gmail.com>

* include cstdint in FileSystem.cpp (#850)

vcpkg installation is failing, with this error: 

PATH/v3.6.0-e25b133cd3.clean/util/src/FileSystem.cpp:122:3: error: ‘uint32_t’ was not declared in this scope

PATH/v3.6.0-e25b133cd3.clean/util/src/FileSystem.cpp:71:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?

Sure enough, when patched with this it will build and install correctly with vcpkg. Other errors are reported but this is the culprit.

* Fixes #840: removes manual reference counting (#841)

* converted registration

* compiled, not passeD

* fixed weak_ptr error, now leaking mock objects

* fixed bug, need to decrement ref count

* updats from last week, test cases failing because of out of date expectations

* all tests are passing with shared and weak pointers to serviceRegistrationBasePrivate

* still passing tests, updated comments and cleaned up

* updating to share dependents

* new issue with dying service

* added coreInfo, maybe passing

* passing tests, removed manual ref counting from referenceBasePrivate, repeated all fast tests to ensure no sporadic failures

* updated comments

* updates before PR

* Removed manual reference counting

The manual reference counting in ServiceRegistrationBasePrivate and ServiceReferenceBasePrivate were removed. Additionally, some properties of ServiceRegistrationBasePrivate were offloaded to a new class ServiceRegistrationCoreInfo which both ServiceRegistrationBasePrivate and ServiceReferenceBasePrivate can access allowing ServiceReferenceBasePrivate to give up ownership of ServiceRegistrationBasePrivate.

Signed-off-by: Toby Cormack  <tcormack@mathworks.com>

* Removed manual reference counting and merged with upstream (#840)

The manual reference counting in ServiceRegistrationBasePrivate and ServiceReferenceBasePrivate were removed. Additionally, some properties of ServiceRegistrationBasePrivate were offloaded to a new class ServiceRegistrationCoreInfo which both ServiceRegistrationBasePrivate and ServiceReferenceBasePrivate can access allowing ServiceReferenceBasePrivate to give up ownership of ServiceRegistrationBasePrivate.

Signed-off-by: Toby Cormack  <tcormack@mathworks.com>

* ServiceRegistrationCoreInfo now default destructor

* Updated based on Patty's comments #840

* updated ServiceReferenceBase Constructors for clarity with shared_ptrs

* removed 'move' from serviceRegistry

* attempt at solving mac issue

* updates for lock type and removing unneccessary functions from reference

* lost lock

* changed to custom atomic load

* LockSet addition

* threading support in LockSet

* LockSet not threaded

* no names in func dec

* Incoorporated Jeff's Comments

* Assignment operator didn't fail on my computer, did in github

* updated for Jeff's 5/16 comments

* clang update

* mikes comments and fixes for multithreaded support

* remove ifdefs from BundleRegistry, abide by rule of (0,3,5), and add comments

---------

Signed-off-by: Toby Cormack  <tcormack@mathworks.com>

* Fixes #852: adds a [[nodiscard]] to BundleContext::RegisterService (#863)

* noDiscard update first push

* Jeff's comments, c++14 in cmakelists for makefile test, comments to reference nodiscard

* [ci skip] Updated README to reflect correct compiler/OS versions (#862)

[ci skip]

* Fix code scanning alerts (#861)

Fixes #860, #859, #858, #857, #856, #855, #853

* Ensure multiple listeners for the same factory PID are honoured by `ConfigurationNotifier::AnyListenersForPid` (#865)

* Ensure multiple listeners for the same PID are honoured

Signed-off-by: Conor Burgess <Burgess.Conor@gmail.com>

* Fix formatting

Signed-off-by: Conor Burgess <Burgess.Conor@gmail.com>

---------

Signed-off-by: Conor Burgess <Burgess.Conor@gmail.com>
Co-authored-by: cburgess <cburgess@mathworks.com>

* Code scanning alert fix: Use of a moved from object #864 (#866)

Fixes #864 

* tests passing on linux, all files updated

* Mike and Toby backat it again

* changed second instance of warning?

* reverted naming, final submit

* Fix race condition when concurrently adding to SCRExtensionRegistry (#870)

* Fix race condition when concurrently adding to SCRExtensionRegistry

Fixed a race that can happen when multiple threads are trying to add to the extension registry container.

Fixed a bug with the tests for SCRExtensionRegsitry class never being compiled and run.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>

* Fix #868: Recoups some of performance losses from PR #841 (#869)

* fixed lockReg shared_ptr

* down to 5% increase from original

* get logs from github to verify behavior

* reverting performance yml and adding move constructor (default) for RegistrationLocks
:

* #Issue873: Redundant calls to .Load() (#874)

* first commit

* test Case

* revert test

* test fix

* naming

* Fixes #718 (#876)

Signed-off-by: Toby Cormack <tcormack@mathworks.com>

* removed an empty line addition.

* fixup some merge issues.

* respond to code review feedback

* code review feedback.

* code review feedback.

* Update TrackedService.h

Remove underscore from names.

* fixing merge

* update _var naming convention

* GetCustomizer_unlocked() addition

* remove getTrackerAsCustomizer

---------

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>
Signed-off-by: Ingmar Sittl <Ingmar.Sittl@elektrobit.com>
Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>
Signed-off-by: Ingmar Sittl <ingmar.sittl@elektrobit.com>
Signed-off-by: The MathWorks, Inc. <bweed@mathworks.com>
Signed-off-by: The MathWorks, Inc. <pelliott@mathworks.com>
Signed-off-by: Tahar Touati <touati.thr@gmail.com>
Signed-off-by: ShivamNegi <shivamnegi2019@gmail.com>
Signed-off-by: Toby Cormack  <tcormack@mathworks.com>
Signed-off-by: Conor Burgess <Burgess.Conor@gmail.com>
Signed-off-by: Toby Cormack <tcormack@mathworks.com>
Co-authored-by: Shane Riley <52603694+shane-riley@users.noreply.github.com>
Co-authored-by: shane-riley (The Mathworks Inc.) <sriley@mathworks.com>
Co-authored-by: xru192 <ryanxu123@gmail.com>
Co-authored-by: xru192 <56376151+xru192@users.noreply.github.com>
Co-authored-by: Jeff DiClemente <jeffdiclemente@users.noreply.github.com>
Co-authored-by: Jeff DiClemente <jdicleme@mathworks.com>
Co-authored-by: pelliott-mathworks <67922241+pelliott-mathworks@users.noreply.github.com>
Co-authored-by: BrianWeed <brian_weed@yahoo.com>
Co-authored-by: carneyweb <mike@carneyweb.com>
Co-authored-by: Ingmar Sittl <79453136+insi-eb@users.noreply.github.com>
Co-authored-by: alchrist <alchrist@mathworks.com>
Co-authored-by: Shivam Negi <shivamnegi2019@gmail.com>
Co-authored-by: Aaditya Sakharam Patil <36245341+aadityap-mathworks@users.noreply.github.com>
Co-authored-by: Aaditya <aadityap@mathworks.com>
Co-authored-by: thrtouati <124062546+thrtouati@users.noreply.github.com>
Co-authored-by: Tristan Ayala <ayalat1@unlv.nevada.edu>
Co-authored-by: tcormackMW <113473781+tcormackMW@users.noreply.github.com>
Co-authored-by: Conor Burgess <Burgess.Conor@gmail.com>
Co-authored-by: cburgess <cburgess@mathworks.com>
Co-authored-by: tcormack <tcormack@mathworks.com>

* CMake Updates for Boost Versioning Fix (#945)

* cmake updates

* behavior put in cmake function

* usFunctionBoostPath update

* Initializer list support (#942)

* get latest on development

* Added support for std::initializer_list constructurs

Updated tests to use new initializer simplifying the code.

* new clone.

* fixed up some test code to make it compile on older compilers.

* fixup.

* updated some tests to check operator=

* check.

* fixed typo in comment.

* added specific tests for initializer list support.

* Revert "get latest on development"

This reverts commit 639f61d.

* test.

* Revert "test."

This reverts commit dd56818.

* Revert "Revert "get latest on development""

This reverts commit 7ef9657.

* Revert "Revert "Revert "get latest on development"""

This reverts commit 6f4d982.

* restore.

* update google test to submodule version on development

* update nowide version to match development

* fixed up some comments.

* ServiceComponent build tests cmake configuration (#949)

* use cmake build type

* set to debug by default

* Fix #961 -- hashable references after destruction of RegistrationBase object (#962)

* update hash function

* test case working

* update version

---------

Signed-off-by: Tahar Touati <touati.thr@gmail.com>
Signed-off-by: ShivamNegi <shivamnegi2019@gmail.com>
Signed-off-by: Toby Cormack  <tcormack@mathworks.com>
Signed-off-by: Conor Burgess <Burgess.Conor@gmail.com>
Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Signed-off-by: Toby Cormack <tcormack@mathworks.com>
Signed-off-by: tcormack <tcormack@mathworks.com>
Signed-off-by: The MathWorks, Inc. aadityap@mathworks.com
Signed-off-by: Ingmar Sittl <ingmar.sittl@elektrobit.com>
Signed-off-by: Ingmar Sittl <Ingmar.Sittl@elektrobit.com>
Signed-off-by: Shivam Negi <snegi@mathworks.com>
Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>
Signed-off-by: The MathWorks, Inc. <aadityap@mathworks.com>
Signed-off-by: The MathWorks, Inc. <bweed@mathworks.com>
Signed-off-by: The MathWorks, Inc. <pelliott@mathworks.com>
Co-authored-by: carneyweb <mike@carneyweb.com>
Co-authored-by: Shivam Negi <shivamnegi2019@gmail.com>
Co-authored-by: thrtouati <124062546+thrtouati@users.noreply.github.com>
Co-authored-by: Tristan Ayala <ayalat1@unlv.nevada.edu>
Co-authored-by: Jeff DiClemente <jeffdiclemente@users.noreply.github.com>
Co-authored-by: Conor Burgess <Burgess.Conor@gmail.com>
Co-authored-by: cburgess <cburgess@mathworks.com>
Co-authored-by: Aaditya Sakharam Patil <36245341+aadityap-mathworks@users.noreply.github.com>
Co-authored-by: aadityap <aadityap@mathworks.com>
Co-authored-by: Ingmar Sittl <79453136+insi-eb@users.noreply.github.com>
Co-authored-by: Monika032 <monikaphadnis24@gmail.com>
Co-authored-by: mphadnis <mphadnis@mathworks.com>
Co-authored-by: Alexander Christoforides <38366659+achristoforides@users.noreply.github.com>
Co-authored-by: Shane Riley <52603694+shane-riley@users.noreply.github.com>
Co-authored-by: shane-riley (The Mathworks Inc.) <sriley@mathworks.com>
Co-authored-by: xru192 <ryanxu123@gmail.com>
Co-authored-by: xru192 <56376151+xru192@users.noreply.github.com>
Co-authored-by: Jeff DiClemente <jdicleme@mathworks.com>
Co-authored-by: pelliott-mathworks <67922241+pelliott-mathworks@users.noreply.github.com>
Co-authored-by: BrianWeed <brian_weed@yahoo.com>
Co-authored-by: alchrist <alchrist@mathworks.com>
  • Loading branch information
22 people committed Dec 8, 2023
1 parent 55dda3b commit 9e595d5
Show file tree
Hide file tree
Showing 351 changed files with 31,144 additions and 10,893 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Cpp11BracedListStyle: false
IndentCaseLabels: true
IndentGotoLabels: false
IndentPPDirectives: AfterHash
InsertBraces: true
NamespaceIndentation: All
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/performance_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: PerformanceWindows

on:
push:
branches: [ development, c\+\+14-compliant, master ]
#This workflow runs only on development branch
#If you want to run performance tests on a particular branch
#Please add your branch name in branches, e.g. branches: [ development, your_branch_name ]
branches: [ development ]
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -54,7 +57,15 @@ jobs:
- name: Run benchmark and store result in json format
run: ${{ env.BUILD_DIR }}\bin\Release\usFrameworkBenchTests.exe --benchmark_format=json | tee ${{ env.BUILD_DIR }}\bin\Release\benchmark_result.json

- name: Upload Performance Results as Artifact
uses: actions/upload-artifact@v3
with:
name: Performance Results - ${{ github.event.head_commit.author.name }} - ${{ github.sha }}
path: ${{ env.BUILD_DIR }}\bin\Release\benchmark_result.json

- name: Deploy results
# Condition the step on the 'development' branch only
if: github.ref == 'refs/heads/development'
uses: benchmark-action/github-action-benchmark@v1.16.1
with:
name: C++ Benchmark
Expand All @@ -66,5 +77,4 @@ jobs:
alert-threshold: '20%'
comment-on-alert: true
fail-on-alert: false



2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ doc/src/examples/makefile/main
*.pyc
/build*
.vscode/
.venv/
.venv/
36 changes: 34 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,57 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_
and this project adheres to `Semantic Versioning <http://semver.org/>`_.

`(UNRELEASED) vX.X.X <https://github.com/cppmicroservices/cppmicroservices/tree/development>`_ (20XX-XX-XX)
`v3.8.0 <https://github.com/cppmicroservices/cppmicroservices/tree/3.8.0>`_ (2023-12-06)
---------------------------------------------------------------------------------------------------------

`Full Changelog <https://github.com/cppmicroservices/cppmicroservices/compare/v3.7.6...development>`_
`Full Changelog <https://github.com/cppmicroservices/cppmicroservices/compare/v3.7.6...3.8.0>`_

Added
-----
- `[Core Framework] Guarentee ordering by rank from GetServiceReferences <https://github.com/CppMicroServices/CppMicroServices/pull/943>`_
- `[Core Framework] Add BundleTracker <https://github.com/CppMicroServices/CppMicroServices/pull/726>`_
- `[Core Framework] Initializer list support for AnyMap <https://github.com/CppMicroServices/CppMicroServices/pull/942>`_

Changed
-------
- `[Core Framework] Remove manual reference counting for serviceRegistrations <https://github.com/CppMicroServices/CppMicroServices/pull/841>`_
- `[Core Framework] Ensure ServiceRegistrationU objects are not discarded from call to RegisterService <https://github.com/CppMicroServices/CppMicroServices/pull/863>`_
- `[Core Framework] Update README to reflect correct compiler/OS versions <https://github.com/CppMicroServices/CppMicroServices/pull/862>`_
- `[Declarative Services] Ensure multiple listeners for same factory PID are honored <https://github.com/CppMicroServices/CppMicroServices/pull/865>`_
- `Update github workflows <https://github.com/CppMicroServices/CppMicroServices/pull/902>`_
- `Use custom boost namespace to avoid symbol collision <https://github.com/CppMicroServices/CppMicroServices/pull/929>`_
- `Update 3rd party dependency versions <https://github.com/CppMicroServices/CppMicroServices/pull/930>`_
- `[Core Framework] Guarentee hash of serviceReference is conserved after destruction of serviceRegistrationBase object <https://github.com/CppMicroServices/CppMicroServices/pull/962>`_

Removed
-------
- `Update to allow custom boost namespace and remove absl dependency <https://github.com/CppMicroServices/CppMicroServices/pull/939>`_

Deprecated
----------

Fixed
-----
- `[Core Framework] Data Race Condition fix for Bundles dataStorage location <https://github.com/CppMicroServices/CppMicroServices/pull/845>`_
- `[Core Framework] Remove problematic std::move calls. <https://github.com/CppMicroServices/CppMicroServices/pull/848>`_
- `[Core Framework] Flag Checking <https://github.com/CppMicroServices/CppMicroServices/pull/849>`_
- `[Core Framework] Include cstdint in FileSystem.cpp <https://github.com/CppMicroServices/CppMicroServices/pull/850>`_
- `[Core Framework] Fix code scanning alerts <https://github.com/CppMicroServices/CppMicroServices/pull/861>`_
- `[Config Admin, Declarative Services] Fix code scanning alerts <https://github.com/CppMicroServices/CppMicroServices/pull/866>`_
- `[Declarative Services] Fix race condition when addint SCRExtensionRegistry <https://github.com/CppMicroServices/CppMicroServices/pull/870>`_
- `[Core Framework] Recoup performance losses <https://github.com/CppMicroServices/CppMicroServices/pull/869>`_
- `[Core Framework] Recoup performance losses <https://github.com/CppMicroServices/CppMicroServices/pull/874>`_
- `[Core Framework] BundleContextTest.NoSegfaultWithServiceFactory sporadic failure fix <https://github.com/CppMicroServices/CppMicroServices/pull/876>`_
- `[Core Framework] Allow char const* properties in LDAPFilters <https://github.com/CppMicroServices/CppMicroServices/pull/877>`_
- `[Core Framework] Reformat hpp FileSystem <https://github.com/CppMicroServices/CppMicroServices/pull/880>`_
- `[Core Framework] Disable incorrect TSAN warnings <https://github.com/CppMicroServices/CppMicroServices/pull/878>`_
- `[Core Framework] Fix potential deadlock in ServiceTracker <https://github.com/CppMicroServices/CppMicroServices/pull/883>`_
- `[Core Framework] Update tests to remove unnecessary globals <https://github.com/CppMicroServices/CppMicroServices/pull/875>`_
- `[Core Framework] Fix serviceTracker deadlock on close() <https://github.com/CppMicroServices/CppMicroServices/pull/922>`_
- `[Core Framework] Update github workflows <https://github.com/CppMicroServices/CppMicroServices/pull/916>`_
- `[Core Framework] Remove unused variable and add missing include <https://github.com/CppMicroServices/CppMicroServices/pull/932>`_
- `[Declarative Services] Fix redundant bundle validation checks <https://github.com/CppMicroServices/CppMicroServices/pull/921>`_
- `[Core Framework] Fix serviceTracker deadlock <https://github.com/CppMicroServices/CppMicroServices/pull/915>`_

`v3.7.6 <https://github.com/cppmicroservices/cppmicroservices/tree/3.7.6>`_ (2023-04-25)
---------------------------------------------------------------------------------------------------------
Expand Down
29 changes: 20 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ set(US_COMPILER_AppleClang_MINIMUM_VERSION_PRODUCT "Xcode 7.3 (Clang ${US_COMPIL
set(US_COMPILER_MSVC_MINIMUM_VERSION_PRODUCT "Visual Studio 2015 (MSVC ${US_COMPILER_MSVC_MINIMUM_VERSION})")

set(US_COMPILER_GNU_MINIMUM_RECOMMENDED_VERSION 9.4.0 )
set(US_COMPILER_Clang_MINIMUM_RECOMMENDED_VERSION 9.0 )
set(US_COMPILER_Clang_MINIMUM_RECOMMENDED_VERSION 9.0.0 )
set(US_COMPILER_AppleClang_MINIMUM_RECOMMENDED_VERSION 12.0.1 )
set(US_COMPILER_MSVC_MINIMUM_RECOMMENDED_VERSION 19.20 )

Expand Down Expand Up @@ -171,6 +171,7 @@ include(usFunctionGenerateBundleInit)
include(usMacroCreateBundle)
include(usFunctionCreateTestBundle)
include(usFunctionCreateDSTestBundle)
include(usFunctionBoostPath)

if (US_COMPILER_CLANG OR US_COMPILER_APPLE_CLANG)
check_cxx_compiler_flag(-Wno-missing-braces HAS_MISSING_BRACES_FLAG)
Expand Down Expand Up @@ -201,13 +202,13 @@ endforeach()
# Set a default build type if none was specified
#-----------------------------------------------------------------------------

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)

# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -252,6 +253,7 @@ us_cache_var(US_ENABLE_COVERAGE OFF BOOL "Enable code coverage" ADVANCED)
us_cache_var(US_BUILD_TESTING OFF BOOL "Build tests")
us_cache_var(US_BUILD_EXAMPLES OFF BOOL "Build example projects")
us_cache_var(US_USE_SYSTEM_GTEST OFF BOOL "Build using an external GTest installation" ADVANCED)
us_cache_var(US_USE_SYSTEM_BOOST OFF BOOL "Build using an external Boost installation" ADVANCED)

set(_us_build_shared ${BUILD_SHARED_LIBS})

Expand Down Expand Up @@ -291,7 +293,7 @@ endif()
# with clang and lld
if ((NOT(US_COMPILER_CLANG) OR NOT(US_USING_LLD)) AND (US_ENABLE_MSAN OR US_ENABLE_UBSAN))
message(FATAL_ERROR "You are trying to use msan or ubsan either without clang as your compiler or \
lld as your linker. Please use clang and lld if you wish to use msan or ubsan")
lld as your linker. Please use clang and lld if you wish to use msan or ubsan")
endif()

# Display the selected sanitizer if one was enabled
Expand Down Expand Up @@ -361,6 +363,14 @@ if (APPLE AND US_COMPILER_APPLE_CLANG)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
endif()

#-----------------------------------------------------------------------------
# 3rd Party Library configuration
#-----------------------------------------------------------------------------

if(US_USE_SYSTEM_BOOST)
find_package(Boost 1.74.0 REQUIRED)
endif()

#-----------------------------------------------------------------------------
# Testing configuration
#-----------------------------------------------------------------------------
Expand All @@ -378,7 +388,7 @@ function(us_add_tests test_driver)
# By default, these tests are not active until the concurrent bundle
# start / stop mechanism has been properly implemented (GitHub Issue #25)
add_test(NAME helgrind_${test} COMMAND ${US_MEMCHECK_COMMAND} --tool=helgrind --error-exitcode=1 ${US_RUNTIME_OUTPUT_DIRECTORY}/${test_driver} ${test}
WORKING_DIRECTORY ${CppMicroServices_BINARY_DIR})
WORKING_DIRECTORY ${CppMicroServices_BINARY_DIR})
set_property(TEST helgrind_${test} PROPERTY LABELS valgrind helgrind)
endif()
endif()
Expand All @@ -387,8 +397,8 @@ function(us_add_tests test_driver)
file(TO_NATIVE_PATH ${US_RUNTIME_OUTPUT_DIRECTORY} US_RUNTIME_OUTPUT_NATIVE_DIRECTORY)
# skip the unicode test bundle because opencppcoverage tool fails if a module is located in a path with unicode characters
add_test(NAME coverage_${test}
COMMAND ${US_COVERAGE_COMMAND} --verbose --cover_children --sources=${PROJECT_SOURCE_NATIVE_PATH} --export_type=binary:${test}.cov --continue_after_cpp_exception --excluded_modules *TestBundleU*.dll -- $<TARGET_FILE:${test_driver}> ${test}
WORKING_DIRECTORY ${CppMicroServices_BINARY_DIR})
COMMAND ${US_COVERAGE_COMMAND} --verbose --cover_children --sources=${PROJECT_SOURCE_NATIVE_PATH} --export_type=binary:${test}.cov --continue_after_cpp_exception --excluded_modules *TestBundleU*.dll -- $<TARGET_FILE:${test_driver}> ${test}
WORKING_DIRECTORY ${CppMicroServices_BINARY_DIR})
set_property(TEST coverage_${test} PROPERTY LABELS opencppcoverage)
endif()
endforeach()
Expand Down Expand Up @@ -524,8 +534,8 @@ else()
endif()

foreach(_cxxflag -Werror -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align
-Wwrite-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast
-Wstrict-null-sentinel -Wsign-promo -fdiagnostics-show-option )
-Wwrite-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast
-Wstrict-null-sentinel -Wsign-promo -fdiagnostics-show-option )
usFunctionCheckCompilerFlags(${_cxxflag} US_CXX_FLAGS)
endforeach()

Expand Down Expand Up @@ -870,6 +880,7 @@ install(EXPORT ${PROJECT_NAME}Targets
${US_CMAKE_DIR}/usFunctionGetResourceSource.cmake
${US_CMAKE_DIR}/usFunctionCheckResourceLinking.cmake
${US_CMAKE_DIR}/usFunctionCheckCompilerFlags.cmake
${US_CMAKE_DIR}/usFunctionBoostPath.cmake
)

install(FILES ${_install_cmake_scripts}
Expand Down
1 change: 1 addition & 0 deletions CppMicroServicesConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ include("@PACKAGE_CONFIG_CMAKE_DIR@/usFunctionGenerateBundleInit.cmake")
include("@PACKAGE_CONFIG_CMAKE_DIR@/usFunctionAddResources.cmake")
include("@PACKAGE_CONFIG_CMAKE_DIR@/usFunctionCheckCompilerFlags.cmake")
include("@PACKAGE_CONFIG_CMAKE_DIR@/usFunctionEmbedResources.cmake")
include("@PACKAGE_CONFIG_CMAKE_DIR@/usFunctionBoostPath.cmake")
include("@PACKAGE_CONFIG_CMAKE_DIR@/usFunctionCheckResourceLinking.cmake")
include("@PACKAGE_CONFIG_CMAKE_DIR@/usFunctionGetResourceSource.cmake")

Expand Down
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ Recommended absolute minimum required compiler versions:
Not all of the absolute minimum compiler versions are tested (as noted). We test and recommend
the following compilers:

- GCC 9.4.0
- Clang 9.0
- GCC 11.3.0
- Clang 11.0
- Clang from Xcode 13.2 and 13.4
- Visual Studio 2019 and 2022

Expand All @@ -91,11 +91,11 @@ use, please see the following resources:

Below is a list of tested compiler/OS combinations:

- GCC 9.4.0 (Ubuntu 20.04)
- GCC 9.5.0 (Ubuntu 22.04)
- Clang 12.0.1 (Ubuntu 22.04)
- Apple Clang, Xcode 13.2.0 (OS X 11.6.8)
- Apple Clang, Xcode 13.4.0 (OS X 12.5.0)
- GCC 7.5.0 (Ubuntu 20.04)
- GCC 11.3.0 (Ubuntu 22.04)
- Clang 11.0.0 (Ubuntu 20.04)
- Apple Clang 13.0.0.13000029, Xcode 13.2.0 (OS X 11.7.6)
- Apple Clang 14.0.0.14000029, Xcode 13.4.0 (OS X 12.6.5)
- Visual Studio 2019
- Visual Studio 2022
- MinGW-w64
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
3.7.6
3.8.0

17 changes: 17 additions & 0 deletions cmake/usFunctionBoostPath.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Helper macro allowing to return path to boost library
#
# Usage:
# usFunctionBoostPath(USE_SYSTEM ${US_USE_SYSTEM_BOOST} CPPMS_SOURCE_DIR ${CppMicroServices_SOURCE_DIR}
# BOOST_DIR ${BOOST_INCLUDEDIR})


function(usFunctionBoostPath)
cmake_parse_arguments(Boost_Path "" "BOOST_SYSTEM;CPPMS_SOURCE_DIR;BOOST_DIR" "" ${ARGN})

if (Boost_Path_BOOST_SYSTEM)
set(_boost_library ${Boost_Path_BOOST_DIR} PARENT_SCOPE)
else()
set(_boost_library ${Boost_Path_CPPMS_SOURCE_DIR}/third_party/boost/include PARENT_SCOPE)
endif()
endfunction()
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ namespace cppmicroservices
class ConfigurationEvent
{
public:
ConfigurationEvent(ServiceReference<ConfigurationAdmin> const configAdmin,
ConfigurationEvent(ServiceReference<ConfigurationAdmin> configAdmin,
const ConfigurationEventType type,
const std::string factoryPid,
const std::string pid)
std::string factoryPid,
std::string pid)
: configAdmin(std::move(configAdmin))
, type(type)
, factoryPid(std::move(factoryPid))
Expand Down
6 changes: 4 additions & 2 deletions compendium/ConfigurationAdmin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ add_compile_definitions(BOOST_DATE_TIME_NO_LIB)
add_compile_definitions(BOOST_REGEX_NO_LIB)

usMacroCreateBundle(ConfigurationAdmin
VERSION "1.3.4"
VERSION "1.3.6"
DEPENDS Framework
TARGET ConfigurationAdmin
SYMBOLIC_NAME configuration_admin
Expand Down Expand Up @@ -65,6 +65,8 @@ target_include_directories(ConfigurationAdmin PRIVATE
${CppMicroServices_SOURCE_DIR}/third_party/googletest/googlemock/include
)

usFunctionBoostPath(BOOST_SYSTEM ${US_USE_SYSTEM_BOOST} CPPMS_SOURCE_DIR ${CppMicroServices_SOURCE_DIR} BOOST_DIR ${BOOST_INCLUDEDIR})

# There are warnings in the boost asio headers which are flagged as errors. Include the boost
# asio headers as system headers to ignore these warnings and not treat them as errors.
include_directories(SYSTEM ${CppMicroServices_SOURCE_DIR}/third_party/boost/include)
include_directories(SYSTEM ${_boost_library})
6 changes: 3 additions & 3 deletions compendium/ConfigurationAdmin/src/CMActivator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace cppmicroservices
// manually
for (auto const& bundle : context.GetBundles())
{
if (cppmicroservices::Bundle::State::STATE_ACTIVE == bundle.GetState())
if (cppmicroservices::Bundle::State::STATE_ACTIVE & bundle.GetState())
{
cppmicroservices::BundleEvent evt(cppmicroservices::BundleEvent::BUNDLE_STARTED, bundle);
BundleChanged(evt);
Expand Down Expand Up @@ -178,11 +178,11 @@ namespace cppmicroservices
}

// TODO: revisit to include LAZY_ACTIVATION when supported by the framework
if (cppmicroservices::BundleEvent::BUNDLE_STARTED == eventType)
if (cppmicroservices::BundleEvent::BUNDLE_STARTED & eventType)
{
CreateExtension(bundle);
}
else if (cppmicroservices::BundleEvent::BUNDLE_STOPPING == eventType)
else if (cppmicroservices::BundleEvent::BUNDLE_STOPPING & eventType)
{
RemoveExtension(bundle);
}
Expand Down
1 change: 0 additions & 1 deletion compendium/ConfigurationAdmin/src/CMAsyncWorkService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ namespace cppmicroservices
using Handler = typename Result::completion_handler_type;

Handler handler(std::forward<decltype(task)>(task));
Result result(handler);

boost::asio::post(threadpool->get_executor(),
[handler = std::move(handler)]() mutable { handler(); });
Expand Down
4 changes: 3 additions & 1 deletion compendium/ConfigurationAdmin/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ target_include_directories(ConfigurationAdminObjs PRIVATE
${CppMicroServices_SOURCE_DIR}/third_party/googletest/googlemock/include
)

usFunctionBoostPath(BOOST_SYSTEM ${US_USE_SYSTEM_BOOST} CPPMS_SOURCE_DIR ${CppMicroServices_SOURCE_DIR} BOOST_DIR ${BOOST_INCLUDEDIR})

# There are warnings in the boost asio headers which are flagged as errors. Include the boost
# asio headers as system headers to ignore these warnings and not treat them as errors.
include_directories(SYSTEM ${CppMicroServices_SOURCE_DIR}/third_party/boost/include)
include_directories(SYSTEM ${_boost_library})
4 changes: 3 additions & 1 deletion compendium/ConfigurationAdmin/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ include_directories(
${GMOCK_INCLUDE_DIRS}
)

usFunctionBoostPath(BOOST_SYSTEM ${US_USE_SYSTEM_BOOST} CPPMS_SOURCE_DIR ${CppMicroServices_SOURCE_DIR} BOOST_DIR ${BOOST_INCLUDEDIR})

# There are warnings in the boost asio headers which are flagged as errors. Include the boost
# asio headers as system headers to ignore these warnings and not treat them as errors.
include_directories(SYSTEM ${CppMicroServices_SOURCE_DIR}/third_party/boost/include)
include_directories(SYSTEM ${_boost_library})

if (US_COMPILER_CLANG OR US_COMPILER_APPLE_CLANG)
check_cxx_compiler_flag(-Wno-inconsistent-missing-override HAS_MISSING_OVERRIDE_FLAG)
Expand Down
6 changes: 4 additions & 2 deletions compendium/DeclarativeServices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ add_compile_definitions(BOOST_REGEX_NO_LIB)


usMacroCreateBundle(DeclarativeServices
VERSION "1.5.3"
VERSION "1.5.6"
DEPENDS Framework
TARGET DeclarativeServices
SYMBOLIC_NAME declarative_services
Expand Down Expand Up @@ -67,6 +67,8 @@ include_directories(${CppMicroServices_SOURCE_DIR}/framework/include
${CppMicroServices_SOURCE_DIR}/cppmicroservices/cm/include
)

usFunctionBoostPath(BOOST_SYSTEM ${US_USE_SYSTEM_BOOST} CPPMS_SOURCE_DIR ${CppMicroServices_SOURCE_DIR} BOOST_DIR ${BOOST_INCLUDEDIR})

# There are warnings in the boost asio headers which are flagged as errors. Include the boost
# asio headers as system headers to ignore these warnings and not treat them as errors.
include_directories(SYSTEM ${CppMicroServices_SOURCE_DIR}/third_party/boost/include)
include_directories(SYSTEM ${_boost_library})
4 changes: 3 additions & 1 deletion compendium/DeclarativeServices/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ include_directories(${CppMicroServices_SOURCE_DIR}/framework/include
${CppMicroServices_SOURCE_DIR}/third_party/googletest/googlemock/include
)

usFunctionBoostPath(BOOST_SYSTEM ${US_USE_SYSTEM_BOOST} CPPMS_SOURCE_DIR ${CppMicroServices_SOURCE_DIR} BOOST_DIR ${BOOST_INCLUDEDIR})

# There are warnings in the boost asio headers which are flagged as errors. Include the boost
# asio headers as system headers to ignore these warnings and not treat them as errors.
include_directories(SYSTEM ${CppMicroServices_SOURCE_DIR}/third_party/boost/include)
include_directories(SYSTEM ${_boost_library})

0 comments on commit 9e595d5

Please sign in to comment.