From 2a9f70c52d3a6bf8a22e7d267a37f2194bc3bbea Mon Sep 17 00:00:00 2001 From: Daniel Thaler Date: Tue, 3 Sep 2024 22:21:12 +0200 Subject: [PATCH] Version 2.2.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- Changelog.md | 10 ++++++++++ src/main.rs | 6 +----- src/remove.rs | 3 +-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ea38cc..c1c237d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,7 +24,7 @@ dependencies = [ [[package]] name = "a2ltool" -version = "2.1.1" +version = "2.2.0" dependencies = [ "a2lfile", "argfile", diff --git a/Cargo.toml b/Cargo.toml index bef6a1f..a05bc2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "a2ltool" -version = "2.1.1" +version = "2.2.0" authors = ["Daniel Thaler "] edition = "2021" license = "MIT OR Apache-2.0" diff --git a/Changelog.md b/Changelog.md index 74f6a59..166b1f7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,15 @@ # Changelog +## Version 2.2.0 + +- upgrade to a2lfile 2.2.0 + - Bugfix: during merges, some items might be renamed to prevent name collisions, but not all references to renamed items were updated inside of TYPEDEF_* + - Successfully parse non-standard a2l files which contain hex-encoded integers where the parser expects a float value. (by @louiscaron) +- Add the ability to remove items by regex. This will remove any CHARACTERISTIC, MEASUREMENT or INSTANCE whose name matches. + Removal happens before insertion, if both are done in the same run. +- Change the behavior of insertion by regex: the regex must match the whole variable name, instead of any substring inside it. + This makes insertion more precise, but some regexes that worked previously will need to be extended with .* + ## Version 2.1.1 - Bugfix: Don't fail to read DWARF type info if it contains any of the attributes packed, atomic, restrict, or immutable. diff --git a/src/main.rs b/src/main.rs index 5730197..f4d8f1a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -273,11 +273,7 @@ fn core() -> Result<(), String> { for msg in log_msgs { cond_print!(verbose, now, msg); } - cond_print!( - verbose, - now, - format!("Removed {} items", removed_count) - ); + cond_print!(verbose, now, format!("Removed {} items", removed_count)); } if let Some(debugdata) = &elf_info { diff --git a/src/remove.rs b/src/remove.rs index 2737d74..adf5eee 100644 --- a/src/remove.rs +++ b/src/remove.rs @@ -11,8 +11,7 @@ pub(crate) fn remove_items( .iter() .map(|re| { // extend the regex to match only the whole string, not just a substring - let extended_regex = - if !re.starts_with('^') && !re.ends_with('$') { + let extended_regex = if !re.starts_with('^') && !re.ends_with('$') { format!("^{re}$") } else { re.to_string()