Skip to content

Commit 9ccb3a4

Browse files
authored
Merge pull request #248 from madsmtm/new-versions
New versions
2 parents 43c1d8a + 230fb98 commit 9ccb3a4

File tree

16 files changed

+80
-19
lines changed

16 files changed

+80
-19
lines changed

block-sys/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## Unreleased - YYYY-MM-DD
88

9+
## 0.1.0-beta.1 - 2022-08-28
10+
11+
### Fixed
12+
* Fixed `docs.rs` setup.
13+
914

1015
## 0.1.0-beta.0 - 2022-07-19
1116

block-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "block-sys"
3-
version = "0.1.0-beta.0" # Remember to update html_root_url in lib.rs
3+
version = "0.1.0-beta.1" # Remember to update html_root_url in lib.rs
44
authors = ["Mads Marquart <[email protected]>"]
55
edition = "2021"
66

@@ -55,7 +55,7 @@ unstable-objfw = []
5555
unstable-docsrs = ["objc-sys", "objc-sys/unstable-docsrs"]
5656

5757
[dependencies]
58-
objc-sys = { path = "../objc-sys", version = "=0.2.0-beta.1", default-features = false, optional = true }
58+
objc-sys = { path = "../objc-sys", version = "=0.2.0-beta.2", default-features = false, optional = true }
5959

6060
[package.metadata.docs.rs]
6161
default-target = "x86_64-apple-darwin"

block-sys/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#![warn(clippy::cargo)]
2121
#![warn(clippy::ptr_as_ptr)]
2222
// Update in Cargo.toml as well.
23-
#![doc(html_root_url = "https://docs.rs/block-sys/0.1.0-beta.0")]
23+
#![doc(html_root_url = "https://docs.rs/block-sys/0.1.0-beta.1")]
2424
#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg, doc_cfg_hide))]
2525
#![cfg_attr(feature = "unstable-docsrs", doc(cfg_hide(doc)))]
2626

block2/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## Unreleased - YYYY-MM-DD
88

9+
## 0.2.0-alpha.6 - 2022-08-28
10+
11+
### Changed
12+
* **BREAKING**: Updated `objc2-encode` to `v2.0.0-pre.2`.
13+
* Updated `ffi` module to `block-sys v0.1.0-beta.1`.
14+
915
### Fixed
1016
* **BREAKING**: Cleaned up `BlockArguments` trait, it is now sealed and a
1117
subtrait of `EncodeArguments`.

block2/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "block2"
33
# Remember to update html_root_url in lib.rs and README.md
4-
version = "0.2.0-alpha.5"
4+
version = "0.2.0-alpha.6"
55
authors = ["Steven Sheldon", "Mads Marquart <[email protected]>"]
66
edition = "2021"
77

@@ -34,8 +34,8 @@ gnustep-2-0 = ["gnustep-1-9", "block-sys/gnustep-2-0", "objc2-encode/gnustep-2-0
3434
gnustep-2-1 = ["gnustep-2-0", "block-sys/gnustep-2-1", "objc2-encode/gnustep-2-1"]
3535

3636
[dependencies]
37-
objc2-encode = { path = "../objc2-encode", version = "=2.0.0-pre.1", default-features = false }
38-
block-sys = { path = "../block-sys", version = "=0.1.0-beta.0", default-features = false }
37+
objc2-encode = { path = "../objc2-encode", version = "=2.0.0-pre.2", default-features = false }
38+
block-sys = { path = "../block-sys", version = "=0.1.0-beta.1", default-features = false }
3939

4040
[package.metadata.docs.rs]
4141
default-target = "x86_64-apple-darwin"

block2/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
#![warn(clippy::cargo)]
8484
#![warn(clippy::ptr_as_ptr)]
8585
// Update in Cargo.toml as well.
86-
#![doc(html_root_url = "https://docs.rs/block2/0.2.0-alpha.5")]
86+
#![doc(html_root_url = "https://docs.rs/block2/0.2.0-alpha.6")]
8787

8888
extern crate alloc;
8989
extern crate std;

objc-sys/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## Unreleased - YYYY-MM-DD
88

9+
## 0.2.0-beta.2 - 2022-08-28
10+
11+
### Fixed
12+
* Fixed `docs.rs` setup.
13+
914

1015
## 0.2.0-beta.1 - 2022-07-19
1116

objc-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "objc-sys"
33
# Remember to update `html_root_url` in lib.rs, the `links` key, and the
44
# exception function name.
5-
version = "0.2.0-beta.1"
5+
version = "0.2.0-beta.2"
66
authors = ["Mads Marquart <[email protected]>"]
77
edition = "2021"
88

objc-sys/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#![allow(non_camel_case_types)]
2525
#![allow(non_upper_case_globals)]
2626
#![allow(non_snake_case)]
27-
#![doc(html_root_url = "https://docs.rs/objc-sys/0.2.0-beta.1")]
27+
#![doc(html_root_url = "https://docs.rs/objc-sys/0.2.0-beta.2")]
2828
#![cfg_attr(feature = "unstable-c-unwind", feature(c_unwind))]
2929
#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg, doc_cfg_hide))]
3030
#![cfg_attr(feature = "unstable-docsrs", doc(cfg_hide(doc)))]

objc2-encode/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## Unreleased - YYYY-MM-DD
88

9+
## 2.0.0-pre.2 - 2022-08-28
10+
911
### Added
1012
* Added `EncodeConvert` trait to help with correctly handling `BOOL`/`bool`.
1113

objc2-encode/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "objc2-encode"
33
# Remember to update html_root_url in lib.rs and README.md
4-
version = "2.0.0-pre.1"
4+
version = "2.0.0-pre.2"
55
authors = ["Steven Sheldon", "Mads Marquart <[email protected]>"]
66
edition = "2021"
77

@@ -39,7 +39,7 @@ gnustep-2-1 = ["gnustep-2-0", "objc-sys/gnustep-2-1"]
3939
[dependencies]
4040
# TODO: Remove this dependency when we can select `macabi` targets separately
4141
# from other targets without using a build script
42-
objc-sys = { path = "../objc-sys", version = "=0.2.0-beta.1", default-features = false }
42+
objc-sys = { path = "../objc-sys", version = "=0.2.0-beta.2", default-features = false }
4343

4444
[package.metadata.docs.rs]
4545
default-target = "x86_64-apple-darwin"

objc2-encode/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#![warn(clippy::cargo)]
9090
#![warn(clippy::ptr_as_ptr)]
9191
// Update in Cargo.toml as well.
92-
#![doc(html_root_url = "https://docs.rs/objc2-encode/2.0.0-pre.1")]
92+
#![doc(html_root_url = "https://docs.rs/objc2-encode/2.0.0-pre.2")]
9393
#![cfg_attr(feature = "unstable-c-unwind", feature(c_unwind))]
9494

9595
#[cfg(doctest)]

objc2/CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77

88
## Unreleased - YYYY-MM-DD
99

10+
## 0.3.0-beta.2 - 2022-08-28
11+
1012
### Added
1113
* Added the `"unstable-static-class"` and `"unstable-static-class-inlined"`
1214
feature flags to make the `class!` macro zero cost.
@@ -67,6 +69,43 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6769
msg_send_id![msg_send_id![class!(MyObject), alloc], init]
6870
};
6971
```
72+
* Updated `ffi` module to `objc-sys v0.2.0-beta.2`.
73+
* **BREAKING**: Updated `encode` module `objc2-encode v2.0.0-pre.2`.
74+
75+
In particular, `Encoding` no longer has a lifetime parameter:
76+
```rust
77+
// Before
78+
#[repr(C)]
79+
pub struct NSRange {
80+
pub location: usize,
81+
pub length: usize,
82+
}
83+
unsafe impl Encode for NSRange {
84+
const ENCODING: Encoding<'static> = Encoding::Struct(
85+
"_NSRange", // This is how the struct is defined in C header files
86+
&[usize::ENCODING, usize::ENCODING]
87+
);
88+
}
89+
unsafe impl RefEncode for NSRange {
90+
const ENCODING_REF: Encoding<'static> = Encoding::Pointer(&Self::ENCODING);
91+
}
92+
93+
// After
94+
#[repr(C)]
95+
pub struct NSRange {
96+
pub location: usize,
97+
pub length: usize,
98+
}
99+
unsafe impl Encode for NSRange {
100+
const ENCODING: Encoding = Encoding::Struct(
101+
"_NSRange", // This is how the struct is defined in C header files
102+
&[usize::ENCODING, usize::ENCODING]
103+
);
104+
}
105+
unsafe impl RefEncode for NSRange {
106+
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
107+
}
108+
```
70109

71110
### Deprecated
72111
* Depreacted `msg_send_bool!` in favour of new functionality on `msg_send!`

objc2/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "objc2"
3-
version = "0.3.0-beta.1" # Remember to update html_root_url in lib.rs
3+
version = "0.3.0-beta.2" # Remember to update html_root_url in lib.rs
44
authors = ["Steven Sheldon", "Mads Marquart <[email protected]>"]
55
edition = "2021"
66

@@ -82,10 +82,10 @@ gnustep-2-1 = ["gnustep-2-0", "objc-sys/gnustep-2-1", "objc2-encode/gnustep-2-1"
8282

8383
[dependencies]
8484
malloc_buf = { version = "1.0", optional = true }
85-
objc-sys = { path = "../objc-sys", version = "=0.2.0-beta.1", default-features = false }
86-
objc2-encode = { path = "../objc2-encode", version = "=2.0.0-pre.1", default-features = false }
85+
objc-sys = { path = "../objc-sys", version = "=0.2.0-beta.2", default-features = false }
86+
objc2-encode = { path = "../objc2-encode", version = "=2.0.0-pre.2", default-features = false }
8787
objc2-proc-macros = { path = "../objc2-proc-macros", version = "0.1.0", optional = true }
88-
block2 = { path = "../block2", version = "=0.2.0-alpha.5", default-features = false, optional = true }
88+
block2 = { path = "../block2", version = "=0.2.0-alpha.6", default-features = false, optional = true }
8989

9090
# Provide methods to convert between `uuid::Uuid` and `objc2::foundation::NSUUID`
9191
uuid = { version = "1.1.2", optional = true, default-features = false }

objc2/src/foundation/array.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,17 +432,21 @@ mod tests {
432432
}
433433

434434
#[test]
435+
#[cfg_attr(
436+
feature = "apple",
437+
ignore = "this works differently on different framework versions"
438+
)]
435439
fn test_iter_no_retain() {
436440
let obj = Id::into_shared(RcTestObject::new());
437441
let array = NSArray::from_slice(&[obj]);
438442
let mut expected = ThreadTestData::current();
439443

440444
let iter = array.iter();
441-
expected.retain += if cfg!(feature = "gnustep-1-7") { 0 } else { 1 };
445+
expected.retain += 0;
442446
expected.assert_current();
443447

444448
assert_eq!(iter.count(), 1);
445-
expected.autorelease += if cfg!(feature = "gnustep-1-7") { 0 } else { 1 };
449+
expected.autorelease += 0;
446450
expected.assert_current();
447451

448452
let iter = array.iter_fast();

objc2/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
#![warn(clippy::cargo)]
176176
#![warn(clippy::ptr_as_ptr)]
177177
// Update in Cargo.toml as well.
178-
#![doc(html_root_url = "https://docs.rs/objc2/0.3.0-beta.1")]
178+
#![doc(html_root_url = "https://docs.rs/objc2/0.3.0-beta.2")]
179179

180180
#[cfg(not(feature = "alloc"))]
181181
compile_error!("The `alloc` feature currently must be enabled.");

0 commit comments

Comments
 (0)