From 0b8cfc576fdb9173652213bd17178df4b68fdf04 Mon Sep 17 00:00:00 2001 From: Brandon Ong Date: Wed, 6 Apr 2022 16:08:16 -0700 Subject: [PATCH 1/5] Bumps in garden : ign-plugin2 Signed-off-by: Brandon Ong --- .github/ci/packages.apt | 4 ++-- CMakeLists.txt | 8 ++++---- examples/CMakeLists.txt | 8 ++++---- loader/conf/CMakeLists.txt | 4 ++-- loader/src/cmd/CMakeLists.txt | 4 ++-- test/integration/plugin.cc | 38 +++++++++++++++++------------------ tutorials/02_installation.md | 6 +++--- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 7eccca8d..be7f3327 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -1,3 +1,3 @@ -libignition-cmake2-dev +libignition-cmake3-dev libignition-tools-dev -libignition-utils1-cli-dev +libignition-utils2-cli-dev diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d574859..22f14d2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ project(ignition-plugin2 VERSION 2.0.0) #============================================================================ # Find ignition-cmake #============================================================================ -find_package(ignition-cmake2 2.8.0 REQUIRED) -set(IGN_CMAKE_VER ${ignition-cmake2_VERSION_MAJOR}) +find_package(ignition-cmake3 2.8.0 REQUIRED) +set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR}) #============================================================================ # Configure the project @@ -43,8 +43,8 @@ find_program(IGN_TOOLS_PROGRAM ign) #-------------------------------------- # Find ignition-utils -ign_find_package(ignition-utils1 REQUIRED COMPONENTS cli) -set(IGN_UTILS_VER ${ignition-utils1_VERSION_MAJOR}) +ign_find_package(ignition-utils2 REQUIRED COMPONENTS cli) +set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR}) #============================================================================ diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index cd8a2a5e..bb00e7fb 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -12,15 +12,15 @@ if(NOT ignition-common2_FOUND) set(IGN_COMMON_VER ${ignition-common3_VERSION_MAJOR}) endif() if(NOT ignition-common2_FOUND AND NOT ignition-common3_FOUND) - find_package(ignition-common4 QUIET REQUIRED) - set(IGN_COMMON_VER ${ignition-common4_VERSION_MAJOR}) + find_package(ignition-common5 QUIET REQUIRED) + set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR}) endif() find_package(ignition-math5 QUIET) set(IGN_MATH_VER ${ignition-math5_VERSION_MAJOR}) if(NOT ignition-math5_FOUND) - find_package(ignition-math6 QUIET REQUIRED) - set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR}) + find_package(ignition-math7 QUIET REQUIRED) + set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR}) endif() add_subdirectory(plugins) diff --git a/loader/conf/CMakeLists.txt b/loader/conf/CMakeLists.txt index fefd7c34..bb7f7078 100644 --- a/loader/conf/CMakeLists.txt +++ b/loader/conf/CMakeLists.txt @@ -3,7 +3,7 @@ set(ign_library_path "${CMAKE_BINARY_DIR}/test/lib/$/ruby/ignition/cmd${ # Generate a configuration file for internal testing. # Note that the major version of the library is included in the name. -# Ex: plugin1.yaml +# Ex: plugin2.yaml configure_file( "${IGN_DESIGNATION}.yaml.in" "${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured" @ONLY) @@ -17,7 +17,7 @@ set(ign_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmd${IGN_DESIGNA # Generate the configuration file that is installed. # Note that the major version of the library is included in the name. -# Ex: plugin1.yaml +# Ex: plugin2.yaml configure_file( "${IGN_DESIGNATION}.yaml.in" "${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml" @ONLY) diff --git a/loader/src/cmd/CMakeLists.txt b/loader/src/cmd/CMakeLists.txt index f443bf10..75dc9014 100644 --- a/loader/src/cmd/CMakeLists.txt +++ b/loader/src/cmd/CMakeLists.txt @@ -24,7 +24,7 @@ install( #=============================================================================== # Generate the ruby script for internal testing. # Note that the major version of the library is included in the name. -# Ex: cmdplugin1.rb +# Ex: cmdplugin2.rb set(cmd_script_generated_test "${CMAKE_BINARY_DIR}/test/lib/$/ruby/ignition/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb") set(cmd_script_configured_test "${CMAKE_CURRENT_BINARY_DIR}/test_cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb.configured") @@ -46,7 +46,7 @@ file(GENERATE # Used for the installed version. # Generate the ruby script that gets installed. # Note that the major version of the library is included in the name. -# Ex: cmdplugin1.rb +# Ex: cmdplugin2.rb set(cmd_script_generated "${CMAKE_CURRENT_BINARY_DIR}/$/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb") set(cmd_script_configured "${CMAKE_CURRENT_BINARY_DIR}/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb.configured") diff --git a/test/integration/plugin.cc b/test/integration/plugin.cc index e372f8bf..0d5ff617 100644 --- a/test/integration/plugin.cc +++ b/test/integration/plugin.cc @@ -256,43 +256,43 @@ void TestSetAndMapUsage( const ignition::plugin::Loader &loader, const ignition::plugin::PluginPtr &plugin) { - PluginPtrType1 plugin1 = plugin; - PluginPtrType2 plugin2 = plugin1; + PluginPtrType1 plugin2 = plugin; + PluginPtrType2 plugin2 = plugin2; - EXPECT_TRUE(plugin1 == plugin); - EXPECT_TRUE(plugin1 == plugin2); - EXPECT_FALSE(plugin1 != plugin2); + EXPECT_TRUE(plugin2 == plugin); + EXPECT_TRUE(plugin2 == plugin2); + EXPECT_FALSE(plugin2 != plugin2); EXPECT_TRUE(plugin2 == plugin); - EXPECT_TRUE(plugin2 == plugin1); - EXPECT_FALSE(plugin2 != plugin1); + EXPECT_TRUE(plugin2 == plugin2); + EXPECT_FALSE(plugin2 != plugin2); std::set orderedSet; - EXPECT_TRUE(orderedSet.insert(plugin1).second); - EXPECT_FALSE(orderedSet.insert(plugin1).second); + EXPECT_TRUE(orderedSet.insert(plugin2).second); + EXPECT_FALSE(orderedSet.insert(plugin2).second); EXPECT_FALSE(orderedSet.insert(plugin2).second); std::unordered_set unorderedSet; - EXPECT_TRUE(unorderedSet.insert(plugin1).second); - EXPECT_FALSE(unorderedSet.insert(plugin1).second); + EXPECT_TRUE(unorderedSet.insert(plugin2).second); + EXPECT_FALSE(unorderedSet.insert(plugin2).second); EXPECT_FALSE(unorderedSet.insert(plugin2).second); std::map orderedMap; - EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin1, "some string")).second); - EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin1, "a string")).second); + EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin2, "some string")).second); + EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin2, "a string")).second); EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin2, "chars")).second); std::unordered_map unorderedMap; - EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin1, "strings")).second); - EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin1, "letters")).second); + EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin2, "strings")).second); + EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin2, "letters")).second); EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin2, "")).second); plugin2 = loader.Instantiate("test::util::DummyMultiPlugin"); - EXPECT_TRUE(plugin1 != plugin2); - EXPECT_FALSE(plugin1 == plugin2); - EXPECT_TRUE(plugin2 != plugin1); - EXPECT_FALSE(plugin2 == plugin1); + EXPECT_TRUE(plugin2 != plugin2); + EXPECT_FALSE(plugin2 == plugin2); + EXPECT_TRUE(plugin2 != plugin2); + EXPECT_FALSE(plugin2 == plugin2); EXPECT_TRUE(orderedSet.insert(plugin2).second); EXPECT_FALSE(orderedSet.insert(plugin2).second); diff --git a/tutorials/02_installation.md b/tutorials/02_installation.md index b97aac89..fb72ee46 100644 --- a/tutorials/02_installation.md +++ b/tutorials/02_installation.md @@ -42,7 +42,7 @@ sudo apt install libignition-plugin-dev 1. Install Ignition dependencies ``` - sudo apt-get install libignition-cmake2-dev libignition-tools-dev libignition-utils1-cli-dev + sudo apt-get install libignition-cmake3-dev libignition-tools-dev libignition-utils2-cli-dev ``` 1. Install Ignition Tools if you want to use the `ign plugin` command line tool: @@ -88,7 +88,7 @@ Sierra (10.12) or later. 2. Run the following commands ```bash brew tap osrf/simulation - brew install ignition-plugin1 + brew install ignition-plugin2 ``` ## Source Installation @@ -96,7 +96,7 @@ Sierra (10.12) or later. 1. Install dependencies ```bash brew tap osrf/simulation - brew install ignition-plugin1 --only-dependencies + brew install ignition-plugin2 --only-dependencies ``` 2. Clone the repository From 3cd814ded6ceac179acd6d97b7af1c5ee3c00472 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 7 Apr 2022 01:46:55 -0700 Subject: [PATCH 2/5] Revert plugin.cc changes --- test/integration/plugin.cc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/test/integration/plugin.cc b/test/integration/plugin.cc index 0d5ff617..e372f8bf 100644 --- a/test/integration/plugin.cc +++ b/test/integration/plugin.cc @@ -256,43 +256,43 @@ void TestSetAndMapUsage( const ignition::plugin::Loader &loader, const ignition::plugin::PluginPtr &plugin) { - PluginPtrType1 plugin2 = plugin; - PluginPtrType2 plugin2 = plugin2; + PluginPtrType1 plugin1 = plugin; + PluginPtrType2 plugin2 = plugin1; - EXPECT_TRUE(plugin2 == plugin); - EXPECT_TRUE(plugin2 == plugin2); - EXPECT_FALSE(plugin2 != plugin2); + EXPECT_TRUE(plugin1 == plugin); + EXPECT_TRUE(plugin1 == plugin2); + EXPECT_FALSE(plugin1 != plugin2); EXPECT_TRUE(plugin2 == plugin); - EXPECT_TRUE(plugin2 == plugin2); - EXPECT_FALSE(plugin2 != plugin2); + EXPECT_TRUE(plugin2 == plugin1); + EXPECT_FALSE(plugin2 != plugin1); std::set orderedSet; - EXPECT_TRUE(orderedSet.insert(plugin2).second); - EXPECT_FALSE(orderedSet.insert(plugin2).second); + EXPECT_TRUE(orderedSet.insert(plugin1).second); + EXPECT_FALSE(orderedSet.insert(plugin1).second); EXPECT_FALSE(orderedSet.insert(plugin2).second); std::unordered_set unorderedSet; - EXPECT_TRUE(unorderedSet.insert(plugin2).second); - EXPECT_FALSE(unorderedSet.insert(plugin2).second); + EXPECT_TRUE(unorderedSet.insert(plugin1).second); + EXPECT_FALSE(unorderedSet.insert(plugin1).second); EXPECT_FALSE(unorderedSet.insert(plugin2).second); std::map orderedMap; - EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin2, "some string")).second); - EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin2, "a string")).second); + EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin1, "some string")).second); + EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin1, "a string")).second); EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin2, "chars")).second); std::unordered_map unorderedMap; - EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin2, "strings")).second); - EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin2, "letters")).second); + EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin1, "strings")).second); + EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin1, "letters")).second); EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin2, "")).second); plugin2 = loader.Instantiate("test::util::DummyMultiPlugin"); - EXPECT_TRUE(plugin2 != plugin2); - EXPECT_FALSE(plugin2 == plugin2); - EXPECT_TRUE(plugin2 != plugin2); - EXPECT_FALSE(plugin2 == plugin2); + EXPECT_TRUE(plugin1 != plugin2); + EXPECT_FALSE(plugin1 == plugin2); + EXPECT_TRUE(plugin2 != plugin1); + EXPECT_FALSE(plugin2 == plugin1); EXPECT_TRUE(orderedSet.insert(plugin2).second); EXPECT_FALSE(orderedSet.insert(plugin2).second); From 6269687f7619520277efb7cf74b818d8c894d39d Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 7 Apr 2022 01:47:55 -0700 Subject: [PATCH 3/5] Correct find_package semver Co-authored-by: Louise Poubel --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22f14d2d..d4c0cd28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project(ignition-plugin2 VERSION 2.0.0) #============================================================================ # Find ignition-cmake #============================================================================ -find_package(ignition-cmake3 2.8.0 REQUIRED) +find_package(ignition-cmake3 3.0.0 REQUIRED) set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR}) #============================================================================ From e60bc5da114bbdea6b3eebf2f1e5868ac927cc25 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 7 Apr 2022 17:47:26 -0700 Subject: [PATCH 4/5] Remove ignition-cmake3 version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4c0cd28..05a1b39c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project(ignition-plugin2 VERSION 2.0.0) #============================================================================ # Find ignition-cmake #============================================================================ -find_package(ignition-cmake3 3.0.0 REQUIRED) +find_package(ignition-cmake3 REQUIRED) set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR}) #============================================================================ From bff7428a66ef32e282f7061cf6ba25bcf7c69def Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 7 Apr 2022 18:28:38 -0700 Subject: [PATCH 5/5] Use ignition-common5 and ignition-math7 only --- examples/CMakeLists.txt | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index bb00e7fb..64030f05 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -2,26 +2,14 @@ cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR) project(examples) -# Find the ignition-plugin library find_package(ignition-plugin2 QUIET REQUIRED COMPONENTS all) set(IGN_PLUGIN_VER ${ignition-plugin2_VERSION_MAJOR}) -find_package(ignition-common2 QUIET) -set(IGN_COMMON_VER ${ignition-common2_VERSION_MAJOR}) -if(NOT ignition-common2_FOUND) - find_package(ignition-common3 QUIET) - set(IGN_COMMON_VER ${ignition-common3_VERSION_MAJOR}) -endif() -if(NOT ignition-common2_FOUND AND NOT ignition-common3_FOUND) - find_package(ignition-common5 QUIET REQUIRED) - set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR}) -endif() -find_package(ignition-math5 QUIET) -set(IGN_MATH_VER ${ignition-math5_VERSION_MAJOR}) -if(NOT ignition-math5_FOUND) - find_package(ignition-math7 QUIET REQUIRED) - set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR}) -endif() +find_package(ignition-common5 QUIET) +set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR}) + +find_package(ignition-math7 QUIET) +set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR}) add_subdirectory(plugins)