From f0ef902db0ac53da531d382da101e53f7308aab8 Mon Sep 17 00:00:00 2001 From: Christian Eltzschig Date: Wed, 13 Dec 2023 02:21:28 +0100 Subject: [PATCH] [#2] Rename iceoryx2-pal-settings into iceoryx2-pal-configuration --- Cargo.toml | 4 ++-- iceoryx2-bb/posix/Cargo.toml | 2 +- iceoryx2-bb/posix/src/config.rs | 6 +++--- iceoryx2-bb/posix/src/directory.rs | 2 +- iceoryx2-bb/posix/src/shared_memory.rs | 2 +- iceoryx2-bb/posix/tests/directory_tests.rs | 2 +- iceoryx2-bb/system-types/Cargo.toml | 2 +- iceoryx2-bb/system-types/src/file_name.rs | 2 +- iceoryx2-bb/system-types/src/file_path.rs | 2 +- iceoryx2-bb/system-types/src/path.rs | 8 ++++---- iceoryx2-bb/testing/Cargo.toml | 2 +- iceoryx2-bb/testing/src/lib.rs | 3 ++- iceoryx2-pal/{settings => configuration}/Cargo.toml | 2 +- iceoryx2-pal/{settings => configuration}/src/lib.rs | 0 iceoryx2-pal/posix/Cargo.toml | 2 +- 15 files changed, 21 insertions(+), 20 deletions(-) rename iceoryx2-pal/{settings => configuration}/Cargo.toml (90%) rename iceoryx2-pal/{settings => configuration}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 90a32558e..cc3838c1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ members = [ "iceoryx2", "iceoryx2-pal/concurrency-primitives", "iceoryx2-pal/posix/", - "iceoryx2-pal/settings/", + "iceoryx2-pal/configuration/", "examples", @@ -47,7 +47,7 @@ iceoryx2-bb-testing = { version = "0.0.1", path = "iceoryx2-bb/testing/" } iceoryx2-pal-concurrency-primitives = { version = "0.0.1", path = "iceoryx2-pal/concurrency-primitives/" } iceoryx2-pal-posix = { version = "0.0.1", path = "iceoryx2-pal/posix/" } -iceoryx2-pal-settings = { version = "0.0.1", path = "iceoryx2-pal/settings/" } +iceoryx2-pal-configuration = { version = "0.0.1", path = "iceoryx2-pal/configuration/" } iceoryx2-cal = { version = "0.0.1", path = "iceoryx2-cal" } diff --git a/iceoryx2-bb/posix/Cargo.toml b/iceoryx2-bb/posix/Cargo.toml index 2d627dc7a..60825fe07 100644 --- a/iceoryx2-bb/posix/Cargo.toml +++ b/iceoryx2-bb/posix/Cargo.toml @@ -16,7 +16,7 @@ iceoryx2-bb-system-types = { workspace = true } iceoryx2-bb-elementary = { workspace = true } iceoryx2-bb-log = { workspace = true } iceoryx2-pal-posix = { workspace = true } -iceoryx2-pal-settings = { workspace = true } +iceoryx2-pal-configuration = { workspace = true } lazy_static = { workspace = true } bitflags = { workspace = true } diff --git a/iceoryx2-bb/posix/src/config.rs b/iceoryx2-bb/posix/src/config.rs index f1b021a9f..fd929b49d 100644 --- a/iceoryx2-bb/posix/src/config.rs +++ b/iceoryx2-bb/posix/src/config.rs @@ -39,11 +39,11 @@ pub const ADAPTIVE_WAIT_FINAL_WAITING_TIME: Duration = Duration::from_millis(10) // directories pub const TEMP_DIRECTORY: Path = - unsafe { Path::new_unchecked(iceoryx2_pal_settings::TEMP_DIRECTORY) }; + unsafe { Path::new_unchecked(iceoryx2_pal_configuration::TEMP_DIRECTORY) }; pub const TEST_DIRECTORY: Path = - unsafe { Path::new_unchecked(iceoryx2_pal_settings::TEST_DIRECTORY) }; + unsafe { Path::new_unchecked(iceoryx2_pal_configuration::TEST_DIRECTORY) }; pub const SHARED_MEMORY_DIRECTORY: Path = - unsafe { Path::new_unchecked(iceoryx2_pal_settings::SHARED_MEMORY_DIRECTORY) }; + unsafe { Path::new_unchecked(iceoryx2_pal_configuration::SHARED_MEMORY_DIRECTORY) }; // TODO unable to verify? pub const ACL_LIST_CAPACITY: u32 = 25; diff --git a/iceoryx2-bb/posix/src/directory.rs b/iceoryx2-bb/posix/src/directory.rs index cde03abc9..1a04232f0 100644 --- a/iceoryx2-bb/posix/src/directory.rs +++ b/iceoryx2-bb/posix/src/directory.rs @@ -40,10 +40,10 @@ use iceoryx2_bb_container::semantic_string::SemanticStringAccessor; use iceoryx2_bb_elementary::enum_gen; use iceoryx2_bb_log::{error, fail, fatal_panic, trace}; use iceoryx2_bb_system_types::{file_name::FileName, file_path::FilePath, path::Path}; +use iceoryx2_pal_configuration::PATH_SEPARATOR; use iceoryx2_pal_posix::posix::Struct; use iceoryx2_pal_posix::*; use iceoryx2_pal_posix::{posix::errno::Errno, posix::S_IFDIR}; -use iceoryx2_pal_settings::PATH_SEPARATOR; use crate::file::{File, FileRemoveError}; use crate::file_type::FileType; diff --git a/iceoryx2-bb/posix/src/shared_memory.rs b/iceoryx2-bb/posix/src/shared_memory.rs index 4dcb51080..e42c27f46 100644 --- a/iceoryx2-bb/posix/src/shared_memory.rs +++ b/iceoryx2-bb/posix/src/shared_memory.rs @@ -75,11 +75,11 @@ use iceoryx2_bb_log::{error, fail, fatal_panic, trace}; use iceoryx2_bb_system_types::file_name::*; use iceoryx2_bb_system_types::file_path::*; use iceoryx2_bb_system_types::path::*; +use iceoryx2_pal_configuration::PATH_SEPARATOR; use iceoryx2_pal_posix::posix::errno::Errno; use iceoryx2_pal_posix::posix::POSIX_SUPPORT_ADVANCED_SIGNAL_HANDLING; use iceoryx2_pal_posix::posix::POSIX_SUPPORT_PERSISTENT_SHARED_MEMORY; use iceoryx2_pal_posix::*; -use iceoryx2_pal_settings::PATH_SEPARATOR; use std::ptr::NonNull; diff --git a/iceoryx2-bb/posix/tests/directory_tests.rs b/iceoryx2-bb/posix/tests/directory_tests.rs index 12c271478..47fc957ac 100644 --- a/iceoryx2-bb/posix/tests/directory_tests.rs +++ b/iceoryx2-bb/posix/tests/directory_tests.rs @@ -21,7 +21,7 @@ use iceoryx2_bb_system_types::file_name::FileName; use iceoryx2_bb_system_types::file_path::FilePath; use iceoryx2_bb_system_types::path::Path; use iceoryx2_bb_testing::assert_that; -use iceoryx2_pal_settings::PATH_SEPARATOR; +use iceoryx2_pal_configuration::PATH_SEPARATOR; struct TestFixture { files: Vec, diff --git a/iceoryx2-bb/system-types/Cargo.toml b/iceoryx2-bb/system-types/Cargo.toml index 04c65a79d..f4c50247e 100644 --- a/iceoryx2-bb/system-types/Cargo.toml +++ b/iceoryx2-bb/system-types/Cargo.toml @@ -13,7 +13,7 @@ version = { workspace = true } [dependencies] iceoryx2-bb-container = { workspace = true } iceoryx2-bb-log = { workspace = true } -iceoryx2-pal-settings = { workspace = true } +iceoryx2-pal-configuration = { workspace = true } serde = { workspace = true } [dev-dependencies] diff --git a/iceoryx2-bb/system-types/src/file_name.rs b/iceoryx2-bb/system-types/src/file_name.rs index 2e15f108d..8e2f73086 100644 --- a/iceoryx2-bb/system-types/src/file_name.rs +++ b/iceoryx2-bb/system-types/src/file_name.rs @@ -28,7 +28,7 @@ //! ``` use iceoryx2_bb_container::semantic_string; -use iceoryx2_pal_settings::FILENAME_LENGTH; +use iceoryx2_pal_configuration::FILENAME_LENGTH; semantic_string! { /// Represents a file name. The restriction are choosen in a way that it is platform independent. diff --git a/iceoryx2-bb/system-types/src/file_path.rs b/iceoryx2-bb/system-types/src/file_path.rs index 012a625d7..d4cb834c3 100644 --- a/iceoryx2-bb/system-types/src/file_path.rs +++ b/iceoryx2-bb/system-types/src/file_path.rs @@ -35,7 +35,7 @@ use iceoryx2_bb_container::byte_string::FixedSizeByteString; use iceoryx2_bb_container::semantic_string; use iceoryx2_bb_container::semantic_string::SemanticStringError; use iceoryx2_bb_log::fail; -use iceoryx2_pal_settings::{PATH_LENGTH, PATH_SEPARATOR}; +use iceoryx2_pal_configuration::{PATH_LENGTH, PATH_SEPARATOR}; semantic_string! { /// Represents a file path. The restriction are choosen in a way that it is platform independent. diff --git a/iceoryx2-bb/system-types/src/path.rs b/iceoryx2-bb/system-types/src/path.rs index 8797f05cc..56fe18199 100644 --- a/iceoryx2-bb/system-types/src/path.rs +++ b/iceoryx2-bb/system-types/src/path.rs @@ -31,12 +31,12 @@ use iceoryx2_bb_container::byte_string::FixedSizeByteString; use iceoryx2_bb_container::semantic_string; use iceoryx2_bb_log::fail; -use iceoryx2_pal_settings::{FILENAME_LENGTH, PATH_SEPARATOR, ROOT}; +use iceoryx2_pal_configuration::{FILENAME_LENGTH, PATH_SEPARATOR, ROOT}; use crate::file_path::FilePath; use iceoryx2_bb_container::semantic_string::*; -const PATH_LENGTH: usize = iceoryx2_pal_settings::PATH_LENGTH; +const PATH_LENGTH: usize = iceoryx2_pal_configuration::PATH_LENGTH; semantic_string! { name: Path, @@ -88,9 +88,9 @@ impl Path { let msg = format!("Unable to add entry \"{}\" to path since it would exceed the maximum supported path length of {} or the entry contains invalid symbols.", entry, PATH_LENGTH); if !self.is_empty() - && self.as_bytes()[self.len() - 1] != iceoryx2_pal_settings::PATH_SEPARATOR + && self.as_bytes()[self.len() - 1] != iceoryx2_pal_configuration::PATH_SEPARATOR { - fail!(from self, when self.push(iceoryx2_pal_settings::PATH_SEPARATOR), + fail!(from self, when self.push(iceoryx2_pal_configuration::PATH_SEPARATOR), "{}", msg); } diff --git a/iceoryx2-bb/testing/Cargo.toml b/iceoryx2-bb/testing/Cargo.toml index a8bc3649b..629850bf9 100644 --- a/iceoryx2-bb/testing/Cargo.toml +++ b/iceoryx2-bb/testing/Cargo.toml @@ -11,4 +11,4 @@ rust-version = { workspace = true } version = { workspace = true } [dependencies] -iceoryx2-pal-settings = { workspace = true } +iceoryx2-pal-configuration = { workspace = true } diff --git a/iceoryx2-bb/testing/src/lib.rs b/iceoryx2-bb/testing/src/lib.rs index 7483eb5f5..5e037d8cf 100644 --- a/iceoryx2-bb/testing/src/lib.rs +++ b/iceoryx2-bb/testing/src/lib.rs @@ -21,4 +21,5 @@ macro_rules! test_requires { } } -pub const AT_LEAST_TIMING_VARIANCE: f32 = iceoryx2_pal_settings::settings::AT_LEAST_TIMING_VARIANCE; +pub const AT_LEAST_TIMING_VARIANCE: f32 = + iceoryx2_pal_configuration::settings::AT_LEAST_TIMING_VARIANCE; diff --git a/iceoryx2-pal/settings/Cargo.toml b/iceoryx2-pal/configuration/Cargo.toml similarity index 90% rename from iceoryx2-pal/settings/Cargo.toml rename to iceoryx2-pal/configuration/Cargo.toml index f1aa066e9..70b0f96d7 100644 --- a/iceoryx2-pal/settings/Cargo.toml +++ b/iceoryx2-pal/configuration/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "iceoryx2-pal-settings" +name = "iceoryx2-pal-configuration" description = "Iceoryx2: [internal] platform specific settings" categories = { workspace = true } edition = { workspace = true } diff --git a/iceoryx2-pal/settings/src/lib.rs b/iceoryx2-pal/configuration/src/lib.rs similarity index 100% rename from iceoryx2-pal/settings/src/lib.rs rename to iceoryx2-pal/configuration/src/lib.rs diff --git a/iceoryx2-pal/posix/Cargo.toml b/iceoryx2-pal/posix/Cargo.toml index d48227d5d..a03d8bc6e 100644 --- a/iceoryx2-pal/posix/Cargo.toml +++ b/iceoryx2-pal/posix/Cargo.toml @@ -16,7 +16,7 @@ bindgen = { workspace = true } [dependencies] iceoryx2-pal-concurrency-primitives = { workspace = true } -iceoryx2-pal-settings = { workspace = true } +iceoryx2-pal-configuration = { workspace = true } lazy_static = { workspace = true } [target.'cfg(windows)'.dependencies]