From ec86532d6910e8e9068bc9425fb4374fdd00cbc7 Mon Sep 17 00:00:00 2001 From: Zaidhaan Date: Mon, 22 May 2023 21:42:35 +0800 Subject: [PATCH 1/6] Fix missing cstdint header in latest gcc build (#513) Signed-off-by: Zaidhaan Hussain --- profiler/src/RemoteryProfilerImpl.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/profiler/src/RemoteryProfilerImpl.hh b/profiler/src/RemoteryProfilerImpl.hh index 90acd261f..bbb4b89bb 100644 --- a/profiler/src/RemoteryProfilerImpl.hh +++ b/profiler/src/RemoteryProfilerImpl.hh @@ -19,6 +19,7 @@ #define GZ_COMMON_REMOTERYPROFILERIMPL_HH_ #include +#include #include "RemoteryConfig.h" #include "Remotery.h" From c9c200308d79cc685b93e945ac0782514b807b1c Mon Sep 17 00:00:00 2001 From: Angelo Elias Dal Zotto Date: Wed, 31 May 2023 10:14:26 -0300 Subject: [PATCH 2/6] Include cstdint to build with GCC 13 (#517) Signed-off-by: Angelo Elias Dal Zotto --- profiler/src/ProfilerImpl.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/profiler/src/ProfilerImpl.hh b/profiler/src/ProfilerImpl.hh index 82d3ddad2..874d11fca 100644 --- a/profiler/src/ProfilerImpl.hh +++ b/profiler/src/ProfilerImpl.hh @@ -19,6 +19,7 @@ #define GZ_COMMON_PROFILERIMPL_HH_ #include +#include namespace ignition { From 11e94807ab35119716e336e14f7a1f2c70aed835 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Tue, 6 Jun 2023 13:36:10 -0500 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=8E=88=203.16.0=20(#519)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Carroll --- CMakeLists.txt | 2 +- Changelog.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a0c067b8..a3f1d19c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) #============================================================================ # Initialize the project #============================================================================ -project(ignition-common3 VERSION 3.15.1) +project(ignition-common3 VERSION 3.16.0) #============================================================================ # Find ignition-cmake diff --git a/Changelog.md b/Changelog.md index 811827086..dfd6c1b24 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,40 @@ ## Gazebo Common 3.x +## Gazebo Common 3.16.0 (2023-06-05) + +1. Include cstdint to build with GCC 13 + * [Pull request #517](https://github.com/gazebosim/gz-common/pull/517) + +1. Fix missing cstdint header in latest gcc build + * [Pull request #513](https://github.com/gazebosim/gz-common/pull/513) + +1. Fix for ffmpeg v6 + * [Pull request #497](https://github.com/gazebosim/gz-common/pull/497) + +1. Include cstring for memcpy + * [Pull request #501](https://github.com/gazebosim/gz-common/pull/501) + +1. Fixed MeshManager Singleton + * [Pull request #451](https://github.com/gazebosim/gz-common/pull/451) + +1. Rename COPYING to LICENSE + * [Pull request #494](https://github.com/gazebosim/gz-common/pull/494) + +1. Add marcoag as codeowner + * [Pull request #493](https://github.com/gazebosim/gz-common/pull/493) + +1. CI workflow: use checkout v3 + * [Pull request #490](https://github.com/gazebosim/gz-common/pull/490) + +1. Improved coverage remotery + * [Pull request #467](https://github.com/gazebosim/gz-common/pull/467) + +1. Added BVH and STL loader tests + * [Pull request #466](https://github.com/gazebosim/gz-common/pull/466) + +1. Increased Image coverage + * [Pull request #465](https://github.com/gazebosim/gz-common/pull/465) + ## Gazebo Common 3.15.1 (2022-10-11) 1. Fix build on case-insensitive filesystems From 2de1bd90e9e0181185a6c6654e638dfb25a1eb24 Mon Sep 17 00:00:00 2001 From: jmachowinski Date: Mon, 13 Nov 2023 21:38:54 +0100 Subject: [PATCH 4/6] Fix segfault in case of no write access to log dir (#546) * fix: Don't recursively call init if log directories can not be created. If there is no permission to create the log directories, the FileLogger will call itself recutsive, as is used ignerr for logging the error, which will call FileLogger::Init again. This commit fixed this, by using std::cerr for the log output in FileLogger::Init. Signed-off-by: Janosch Machowinski Co-authored-by: Ian Chen --- include/gz/common/Filesystem.hh | 8 +++++++- src/Console.cc | 11 ++++++++--- src/EnumIface_TEST.cc | 2 +- src/Filesystem.cc | 10 ++++++++-- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/include/gz/common/Filesystem.hh b/include/gz/common/Filesystem.hh index d1c2ea326..8541d80c5 100644 --- a/include/gz/common/Filesystem.hh +++ b/include/gz/common/Filesystem.hh @@ -63,7 +63,13 @@ namespace ignition /// \return True if directory creation was successful, false otherwise. bool IGNITION_COMMON_VISIBLE createDirectory(const std::string &_path); - /// \brief Create directories for the given path + /// \brief Create directories for the given path errors are printed to the given stream + /// \param[in] _path Path to create directories from + /// \param[in] _errorOut Stream for error output + /// \return true on success + bool IGNITION_COMMON_VISIBLE createDirectories(const std::string &_path, std::ostream &_errorOut); + + /// \brief Create directories for the given path errors are printed on ignerr /// \param[in] _path Path to create directories from /// \return true on success bool IGNITION_COMMON_VISIBLE createDirectories(const std::string &_path); diff --git a/src/Console.cc b/src/Console.cc index d6604448e..c57e68597 100644 --- a/src/Console.cc +++ b/src/Console.cc @@ -261,8 +261,8 @@ void FileLogger::Init(const std::string &_directory, { if (!env(IGN_HOMEDIR, logPath)) { - ignerr << "Missing HOME environment variable." - << "No log file will be generated."; + std::cerr << "Missing HOME environment variable. " + << "No log file will be generated."; return; } logPath = joinPaths(logPath, _directory); @@ -275,7 +275,12 @@ void FileLogger::Init(const std::string &_directory, auto* buf = dynamic_cast(this->rdbuf()); // Create the directory if it doesn't exist. - createDirectories(logPath); + if(!createDirectories(logPath, std::cerr)) + { + std::cerr << "Failed to generate log directories. " + << "No log file will be generated."; + return; + } logPath = joinPaths(logPath, _filename); diff --git a/src/EnumIface_TEST.cc b/src/EnumIface_TEST.cc index 69a70b77b..852e2b7dd 100644 --- a/src/EnumIface_TEST.cc +++ b/src/EnumIface_TEST.cc @@ -41,7 +41,7 @@ IGN_ENUM(myTypeIface, MyType, MY_TYPE_BEGIN, MY_TYPE_END, ///////////////////////////////////////////////// TEST_F(EnumIfaceTest, StringCoversion) { - MyType type; + MyType type = MyType::TYPE2; // Set value from string myTypeIface.Set(type, "TYPE1"); diff --git a/src/Filesystem.cc b/src/Filesystem.cc index b363ad91e..6cf911b7b 100644 --- a/src/Filesystem.cc +++ b/src/Filesystem.cc @@ -465,6 +465,12 @@ bool common::copyDirectory(const std::string &_existingDirname, ///////////////////////////////////////////////// bool common::createDirectories(const std::string &_path) +{ + return createDirectories(_path, ignerr); +} + +///////////////////////////////////////////////// +bool common::createDirectories(const std::string &_path, std::ostream &_errorOut) { size_t index = 0; while (index < _path.size()) @@ -482,8 +488,8 @@ bool common::createDirectories(const std::string &_path) if (mkdir(dir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) { #endif - ignerr << "Failed to create directory [" + dir + "]: " - << std::strerror(errno) << std::endl; + _errorOut << "Failed to create directory [" + dir + "]: " + << std::strerror(errno) << std::endl; return false; } } From 5b8f27f388168bce293be6c586bfc09c3a7dd7a5 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Mon, 13 Nov 2023 14:39:16 -0600 Subject: [PATCH 5/6] Update github action workflows (#558) * Use on `push` only on stable branches to avoid duplicate runs * Update project automation Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 12 +++++++++--- .github/workflows/triage.yml | 9 +++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 744bfcff3..cd43a3b39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,12 @@ name: Ubuntu CI -on: [push, pull_request] +on: + pull_request: + push: + branches: + - 'ign-common[0-9]' + - 'gz-common[0-9]' + - 'main' jobs: bionic-ci: @@ -8,7 +14,7 @@ jobs: name: Ubuntu Bionic CI steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compile and test id: ci uses: ignition-tooling/action-ignition-ci@bionic @@ -19,7 +25,7 @@ jobs: name: Ubuntu Focal CI steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compile and test id: ci uses: ignition-tooling/action-ignition-ci@focal diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 736670e0e..2332244bf 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -10,10 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Add ticket to inbox - uses: technote-space/create-project-card-action@v1 + uses: actions/add-to-project@v0.5.0 with: - PROJECT: Core development - COLUMN: Inbox - GITHUB_TOKEN: ${{ secrets.TRIAGE_TOKEN }} - CHECK_ORG_PROJECT: true - + project-url: https://github.com/orgs/gazebosim/projects/7 + github-token: ${{ secrets.TRIAGE_TOKEN }} From e899db5487472180ad96967d98376f2abf495207 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Mon, 4 Dec 2023 10:51:29 -0600 Subject: [PATCH 6/6] Fix error output when creating directories (#561) Signed-off-by: Michael Carroll --- src/Filesystem.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Filesystem.cc b/src/Filesystem.cc index 6cf911b7b..e8b68cab6 100644 --- a/src/Filesystem.cc +++ b/src/Filesystem.cc @@ -466,11 +466,16 @@ bool common::copyDirectory(const std::string &_existingDirname, ///////////////////////////////////////////////// bool common::createDirectories(const std::string &_path) { - return createDirectories(_path, ignerr); + std::ostringstream ss; + auto ret = createDirectories(_path, ss); + if (!ret) + ignerr << ss.str(); + return ret; } ///////////////////////////////////////////////// -bool common::createDirectories(const std::string &_path, std::ostream &_errorOut) +bool common::createDirectories( + const std::string &_path, std::ostream &_errorOut) { size_t index = 0; while (index < _path.size())