From b1bbb2dab4f2a58d9bdb56e3544e2b68fe4c890b Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Jul 2023 11:18:27 +0200 Subject: [PATCH 1/6] Bump objc2-encode version 2.0.0 -> 3.0.0 --- Cargo.lock | 2 +- crates/objc2-encode/CHANGELOG.md | 7 +++++++ crates/objc2-encode/Cargo.toml | 4 ++-- crates/objc2-encode/src/lib.rs | 2 +- crates/objc2/CHANGELOG.md | 4 ++++ crates/objc2/Cargo.toml | 2 +- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5371fd753..b38dab6fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "objc2-encode" -version = "2.0.0" +version = "3.0.0" [[package]] name = "objc2-proc-macros" diff --git a/crates/objc2-encode/CHANGELOG.md b/crates/objc2-encode/CHANGELOG.md index c5f0a22db..d1c6d6f11 100644 --- a/crates/objc2-encode/CHANGELOG.md +++ b/crates/objc2-encode/CHANGELOG.md @@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased - YYYY-MM-DD +## 3.0.0 - 2023-07-31 + +### Fixed +* Bumped version number to ensure that this crate can be compiled together + with code that depends on pre-releases of `2.0.0`. + + ## 2.0.0 - 2023-06-20 ### Added diff --git a/crates/objc2-encode/Cargo.toml b/crates/objc2-encode/Cargo.toml index 7b6609264..91b0d646b 100644 --- a/crates/objc2-encode/Cargo.toml +++ b/crates/objc2-encode/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "objc2-encode" -# Remember to update html_root_url in lib.rs and README.md -version = "2.0.0" +# Remember to update html_root_url in lib.rs +version = "3.0.0" authors = ["Steven Sheldon", "Mads Marquart "] edition = "2021" rust-version = "1.60" diff --git a/crates/objc2-encode/src/lib.rs b/crates/objc2-encode/src/lib.rs index 575526a1b..fae47ad26 100644 --- a/crates/objc2-encode/src/lib.rs +++ b/crates/objc2-encode/src/lib.rs @@ -44,7 +44,7 @@ #![warn(clippy::cargo)] #![warn(clippy::ptr_as_ptr)] // Update in Cargo.toml as well. -#![doc(html_root_url = "https://docs.rs/objc2-encode/2.0.0")] +#![doc(html_root_url = "https://docs.rs/objc2-encode/3.0.0")] #![cfg_attr(feature = "unstable-c-unwind", feature(c_unwind))] #[cfg(doctest)] diff --git a/crates/objc2/CHANGELOG.md b/crates/objc2/CHANGELOG.md index f38685187..e7b2237d9 100644 --- a/crates/objc2/CHANGELOG.md +++ b/crates/objc2/CHANGELOG.md @@ -21,6 +21,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). To better fit with Swift's naming scheme. The types are still available under the old names as deprecated aliases. +### Fixed +* Updated `encode` types to those from `objc2-encode v3.0.0`. Should allow + this crate can be compiled together with pre-release versions. + ## 0.4.0 - 2023-06-20 diff --git a/crates/objc2/Cargo.toml b/crates/objc2/Cargo.toml index 5ecad87b7..c9161e4a9 100644 --- a/crates/objc2/Cargo.toml +++ b/crates/objc2/Cargo.toml @@ -99,7 +99,7 @@ unstable-compiler-rt = ["apple"] [dependencies] malloc_buf = { version = "1.0", optional = true } objc-sys = { path = "../objc-sys", version = "0.3.1", default-features = false } -objc2-encode = { path = "../objc2-encode", version = "2.0.0", default-features = false } +objc2-encode = { path = "../objc2-encode", version = "3.0.0", default-features = false } objc2-proc-macros = { path = "../objc2-proc-macros", version = "0.1.1", optional = true } [dev-dependencies] From f668c4c170b14f72ad24d1cae706c705e2e6b62d Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Jul 2023 11:29:48 +0200 Subject: [PATCH 2/6] Bump objc2 version 0.4.0 -> 0.4.1 --- Cargo.lock | 2 +- crates/block2/Cargo.toml | 2 +- crates/icrate/Cargo.toml | 2 +- crates/objc2/CHANGELOG.md | 11 +++++++++-- crates/objc2/Cargo.toml | 2 +- crates/objc2/src/lib.rs | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b38dab6fd..c8af9ab41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,7 +280,7 @@ dependencies = [ [[package]] name = "objc2" -version = "0.4.0" +version = "0.4.1" dependencies = [ "iai", "malloc_buf", diff --git a/crates/block2/Cargo.toml b/crates/block2/Cargo.toml index 7f308a943..aa9e67fa6 100644 --- a/crates/block2/Cargo.toml +++ b/crates/block2/Cargo.toml @@ -35,7 +35,7 @@ gnustep-2-0 = ["gnustep-1-9", "block-sys/gnustep-2-0", "objc2/gnustep-2-0"] gnustep-2-1 = ["gnustep-2-0", "block-sys/gnustep-2-1", "objc2/gnustep-2-1"] [dependencies] -objc2 = { path = "../objc2", version = "0.4.0", default-features = false } +objc2 = { path = "../objc2", version = "0.4.1", default-features = false } block-sys = { path = "../block-sys", version = "0.2.0", default-features = false } [package.metadata.docs.rs] diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml index 46ea56424..2c229e088 100644 --- a/crates/icrate/Cargo.toml +++ b/crates/icrate/Cargo.toml @@ -20,7 +20,7 @@ documentation = "https://docs.rs/icrate/" license = "MIT" [dependencies] -objc2 = { path = "../objc2", version = "0.4.0", default-features = false, optional = true } +objc2 = { path = "../objc2", version = "0.4.1", default-features = false, optional = true } block2 = { path = "../block2", version = "0.2.0", default-features = false, optional = true } dispatch = { version = "0.2.0", optional = true } diff --git a/crates/objc2/CHANGELOG.md b/crates/objc2/CHANGELOG.md index e7b2237d9..fff46341f 100644 --- a/crates/objc2/CHANGELOG.md +++ b/crates/objc2/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased - YYYY-MM-DD + +## 0.4.1 - 2023-07-31 + ### Added * Allow using `MainThreadMarker` in `extern_methods!`. * Added the feature flag `"relax-void-encoding"`, which when enabled, allows @@ -22,8 +25,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). under the old names as deprecated aliases. ### Fixed -* Updated `encode` types to those from `objc2-encode v3.0.0`. Should allow - this crate can be compiled together with pre-release versions. +* **BREAKING**: Updated `encode` types to those from `objc2-encode v3.0.0`. + + This is technically a breaking change, but it should allow this crate to be + compiled together with pre-release versions of it, meaning that in practice + strictly more code out there will compile because of this. Hence it was + deemed the better trade-off. ## 0.4.0 - 2023-06-20 diff --git a/crates/objc2/Cargo.toml b/crates/objc2/Cargo.toml index c9161e4a9..3daf326c2 100644 --- a/crates/objc2/Cargo.toml +++ b/crates/objc2/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "objc2" -version = "0.4.0" # Remember to update html_root_url in lib.rs +version = "0.4.1" # Remember to update html_root_url in lib.rs authors = ["Steven Sheldon", "Mads Marquart "] edition = "2021" rust-version = "1.60" diff --git a/crates/objc2/src/lib.rs b/crates/objc2/src/lib.rs index 12077f1e3..716f477cc 100644 --- a/crates/objc2/src/lib.rs +++ b/crates/objc2/src/lib.rs @@ -166,7 +166,7 @@ #![warn(clippy::cargo)] #![warn(clippy::ptr_as_ptr)] // Update in Cargo.toml as well. -#![doc(html_root_url = "https://docs.rs/objc2/0.4.0")] +#![doc(html_root_url = "https://docs.rs/objc2/0.4.1")] #[cfg(not(feature = "alloc"))] compile_error!("The `alloc` feature currently must be enabled."); From 9bda4885bf515644f04fcbe9b228cb0b7361404b Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Jul 2023 11:29:57 +0200 Subject: [PATCH 3/6] Bump block2 version 0.2.0 -> 0.3.0 --- Cargo.lock | 2 +- crates/block2/CHANGELOG.md | 7 +++++++ crates/block2/Cargo.toml | 2 +- crates/block2/src/lib.rs | 2 +- crates/icrate/CHANGELOG.md | 6 ++++++ crates/icrate/Cargo.toml | 2 +- 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c8af9ab41..d593af065 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ dependencies = [ [[package]] name = "block2" -version = "0.2.0" +version = "0.3.0" dependencies = [ "block-sys", "objc2", diff --git a/crates/block2/CHANGELOG.md b/crates/block2/CHANGELOG.md index d11bfcf8d..415ee0ca6 100644 --- a/crates/block2/CHANGELOG.md +++ b/crates/block2/CHANGELOG.md @@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased - YYYY-MM-DD +## 0.3.0 - 2023-07-31 + +### Fixed +* Bumped version number to ensure that this crate can be compiled together + with code that depends on pre-releases of `0.2.0`. + + ## 0.2.0 - 2023-06-20 ### Changed diff --git a/crates/block2/Cargo.toml b/crates/block2/Cargo.toml index aa9e67fa6..05fec97a1 100644 --- a/crates/block2/Cargo.toml +++ b/crates/block2/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "block2" # Remember to update html_root_url in lib.rs and README.md -version = "0.2.0" +version = "0.3.0" authors = ["Steven Sheldon", "Mads Marquart "] edition = "2021" rust-version = "1.60" diff --git a/crates/block2/src/lib.rs b/crates/block2/src/lib.rs index 7957caa78..5ee12e786 100644 --- a/crates/block2/src/lib.rs +++ b/crates/block2/src/lib.rs @@ -83,7 +83,7 @@ #![warn(clippy::cargo)] #![warn(clippy::ptr_as_ptr)] // Update in Cargo.toml as well. -#![doc(html_root_url = "https://docs.rs/block2/0.2.0")] +#![doc(html_root_url = "https://docs.rs/block2/0.3.0")] extern crate alloc; extern crate std; diff --git a/crates/icrate/CHANGELOG.md b/crates/icrate/CHANGELOG.md index 8b9e095b3..6994b178b 100644 --- a/crates/icrate/CHANGELOG.md +++ b/crates/icrate/CHANGELOG.md @@ -10,6 +10,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## icrate Unreleased - YYYY-MM-DD +### Changed +* **BREAKING**: Updated `block2` to `v0.3.0`. + +### Fixed +* Documentation on docs.rs. + ## icrate 0.0.3 - 2023-06-20 diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml index 2c229e088..cacad21c7 100644 --- a/crates/icrate/Cargo.toml +++ b/crates/icrate/Cargo.toml @@ -21,7 +21,7 @@ license = "MIT" [dependencies] objc2 = { path = "../objc2", version = "0.4.1", default-features = false, optional = true } -block2 = { path = "../block2", version = "0.2.0", default-features = false, optional = true } +block2 = { path = "../block2", version = "0.3.0", default-features = false, optional = true } dispatch = { version = "0.2.0", optional = true } [dev-dependencies] From 796eb4b20afb5e5888047954c0e145742cce4d2c Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Jul 2023 11:29:32 +0200 Subject: [PATCH 4/6] Bump icrate version 0.0.3 -> 0.0.4 --- Cargo.lock | 2 +- crates/icrate/CHANGELOG.md | 3 +++ crates/icrate/Cargo.toml | 2 +- crates/icrate/src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d593af065..fe3be18c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,7 +181,7 @@ dependencies = [ [[package]] name = "icrate" -version = "0.0.3" +version = "0.0.4" dependencies = [ "block2", "dispatch", diff --git a/crates/icrate/CHANGELOG.md b/crates/icrate/CHANGELOG.md index 6994b178b..1dda9ef6c 100644 --- a/crates/icrate/CHANGELOG.md +++ b/crates/icrate/CHANGELOG.md @@ -10,6 +10,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## icrate Unreleased - YYYY-MM-DD + +## icrate 0.0.4 - 2023-07-31 + ### Changed * **BREAKING**: Updated `block2` to `v0.3.0`. diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml index cacad21c7..fd73df80d 100644 --- a/crates/icrate/Cargo.toml +++ b/crates/icrate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "icrate" -version = "0.0.3" # Remember to update html_root_url in lib.rs +version = "0.0.4" # Remember to update html_root_url in lib.rs authors = ["Mads Marquart "] edition = "2021" rust-version = "1.60" diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 4d06112f7..66b0d2dcd 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -21,7 +21,7 @@ #![allow(clippy::identity_op)] #![allow(clippy::missing_safety_doc)] // Update in Cargo.toml as well. -#![doc(html_root_url = "https://docs.rs/icrate/0.0.3")] +#![doc(html_root_url = "https://docs.rs/icrate/0.0.4")] #![recursion_limit = "512"] #[cfg(feature = "alloc")] From 5c0265b2308a87e53e1a55050b79a658725eeb33 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Jul 2023 23:38:21 +0200 Subject: [PATCH 5/6] Change release checklist to not require fixing things in other PRs --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 74060724a..b93c27a97 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,6 @@ Copy and fill out the following checklist into the release PR: - Local tests have been run (see `helper-scripts/test-local.fish`): - [ ] macOS 10.14.6 32bit - [ ] iOS 9.3.6, 1st generation iPad Mini -- [ ] Any errors that emerge have been fixed in other PRs. Post merge: - [ ] A tag is created on the merge commit for each new version. From 704610ae11a0773e229b8bada0d0968e48d7ad49 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Jul 2023 23:38:52 +0200 Subject: [PATCH 6/6] Fix autorelease test on ARM --- crates/objc2/src/rc/test_object.rs | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/crates/objc2/src/rc/test_object.rs b/crates/objc2/src/rc/test_object.rs index a125c4668..316b3b8cf 100644 --- a/crates/objc2/src/rc/test_object.rs +++ b/crates/objc2/src/rc/test_object.rs @@ -388,9 +388,6 @@ mod tests { #[allow(clippy::if_same_then_else)] const IF_AUTORELEASE_NOT_SKIPPED: usize = if cfg!(feature = "gnustep-1-7") { 1 - } else if cfg!(all(target_arch = "arm", panic = "unwind")) { - // 32-bit ARM unwinding interferes with the optimization - 2 } else if cfg!(target_arch = "x86") { // x86 autorelease_return is not currently tail-called, so the // optimization doesn't work on declare_class! functions. @@ -401,6 +398,15 @@ mod tests { 1 } - 1; + // 32-bit ARM unwinding sometimes interferes with the optimization + const IF_AUTORELEASE_NOT_SKIPPED_ARM_HACK: usize = { + if cfg!(all(target_arch = "arm", panic = "unwind")) { + 1 + } else { + IF_AUTORELEASE_NOT_SKIPPED + } + }; + macro_rules! test_error_id { ($expected:expr, $if_autorelease_not_skipped:expr, $sel:ident, $($obj:tt)*) => { // Succeeds @@ -457,7 +463,12 @@ mod tests { let obj = __RcTestObject::new(); expected.alloc += 1; expected.init += 1; - test_error_id!(expected, IF_AUTORELEASE_NOT_SKIPPED, idAndShouldError, &obj); + test_error_id!( + expected, + IF_AUTORELEASE_NOT_SKIPPED_ARM_HACK, + idAndShouldError, + &obj + ); expected.alloc -= 1; expected.release -= 1; @@ -525,12 +536,12 @@ mod tests { assert!(res.is_some()); expected.alloc += 1; expected.init += 1; - expected.autorelease += IF_AUTORELEASE_NOT_SKIPPED; - expected.retain += IF_AUTORELEASE_NOT_SKIPPED; + expected.autorelease += IF_AUTORELEASE_NOT_SKIPPED_ARM_HACK; + expected.retain += IF_AUTORELEASE_NOT_SKIPPED_ARM_HACK; expected.assert_current(); res }); - expected.release += IF_AUTORELEASE_NOT_SKIPPED; + expected.release += IF_AUTORELEASE_NOT_SKIPPED_ARM_HACK; expected.assert_current(); } }