Skip to content

Commit

Permalink
Merge pull request #248 from madsmtm/new-versions
Browse files Browse the repository at this point in the history
New versions
  • Loading branch information
madsmtm authored Aug 28, 2022
2 parents 43c1d8a + 230fb98 commit 9ccb3a4
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 19 deletions.
5 changes: 5 additions & 0 deletions block-sys/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased - YYYY-MM-DD

## 0.1.0-beta.1 - 2022-08-28

### Fixed
* Fixed `docs.rs` setup.


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

Expand Down
4 changes: 2 additions & 2 deletions block-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "block-sys"
version = "0.1.0-beta.0" # Remember to update html_root_url in lib.rs
version = "0.1.0-beta.1" # Remember to update html_root_url in lib.rs
authors = ["Mads Marquart <[email protected]>"]
edition = "2021"

Expand Down Expand Up @@ -55,7 +55,7 @@ unstable-objfw = []
unstable-docsrs = ["objc-sys", "objc-sys/unstable-docsrs"]

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

[package.metadata.docs.rs]
default-target = "x86_64-apple-darwin"
Expand Down
2 changes: 1 addition & 1 deletion block-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#![warn(clippy::cargo)]
#![warn(clippy::ptr_as_ptr)]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/block-sys/0.1.0-beta.0")]
#![doc(html_root_url = "https://docs.rs/block-sys/0.1.0-beta.1")]
#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg, doc_cfg_hide))]
#![cfg_attr(feature = "unstable-docsrs", doc(cfg_hide(doc)))]

Expand Down
6 changes: 6 additions & 0 deletions block2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased - YYYY-MM-DD

## 0.2.0-alpha.6 - 2022-08-28

### Changed
* **BREAKING**: Updated `objc2-encode` to `v2.0.0-pre.2`.
* Updated `ffi` module to `block-sys v0.1.0-beta.1`.

### Fixed
* **BREAKING**: Cleaned up `BlockArguments` trait, it is now sealed and a
subtrait of `EncodeArguments`.
Expand Down
6 changes: 3 additions & 3 deletions block2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "block2"
# Remember to update html_root_url in lib.rs and README.md
version = "0.2.0-alpha.5"
version = "0.2.0-alpha.6"
authors = ["Steven Sheldon", "Mads Marquart <[email protected]>"]
edition = "2021"

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

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

[package.metadata.docs.rs]
default-target = "x86_64-apple-darwin"
Expand Down
2 changes: 1 addition & 1 deletion block2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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-alpha.5")]
#![doc(html_root_url = "https://docs.rs/block2/0.2.0-alpha.6")]

extern crate alloc;
extern crate std;
Expand Down
5 changes: 5 additions & 0 deletions objc-sys/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased - YYYY-MM-DD

## 0.2.0-beta.2 - 2022-08-28

### Fixed
* Fixed `docs.rs` setup.


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

Expand Down
2 changes: 1 addition & 1 deletion objc-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "objc-sys"
# Remember to update `html_root_url` in lib.rs, the `links` key, and the
# exception function name.
version = "0.2.0-beta.1"
version = "0.2.0-beta.2"
authors = ["Mads Marquart <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion objc-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#![doc(html_root_url = "https://docs.rs/objc-sys/0.2.0-beta.1")]
#![doc(html_root_url = "https://docs.rs/objc-sys/0.2.0-beta.2")]
#![cfg_attr(feature = "unstable-c-unwind", feature(c_unwind))]
#![cfg_attr(feature = "unstable-docsrs", feature(doc_auto_cfg, doc_cfg_hide))]
#![cfg_attr(feature = "unstable-docsrs", doc(cfg_hide(doc)))]
Expand Down
2 changes: 2 additions & 0 deletions objc2-encode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased - YYYY-MM-DD

## 2.0.0-pre.2 - 2022-08-28

### Added
* Added `EncodeConvert` trait to help with correctly handling `BOOL`/`bool`.

Expand Down
4 changes: 2 additions & 2 deletions objc2-encode/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "objc2-encode"
# Remember to update html_root_url in lib.rs and README.md
version = "2.0.0-pre.1"
version = "2.0.0-pre.2"
authors = ["Steven Sheldon", "Mads Marquart <[email protected]>"]
edition = "2021"

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

[package.metadata.docs.rs]
default-target = "x86_64-apple-darwin"
Expand Down
2 changes: 1 addition & 1 deletion objc2-encode/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,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-pre.1")]
#![doc(html_root_url = "https://docs.rs/objc2-encode/2.0.0-pre.2")]
#![cfg_attr(feature = "unstable-c-unwind", feature(c_unwind))]

#[cfg(doctest)]
Expand Down
39 changes: 39 additions & 0 deletions objc2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased - YYYY-MM-DD

## 0.3.0-beta.2 - 2022-08-28

### Added
* Added the `"unstable-static-class"` and `"unstable-static-class-inlined"`
feature flags to make the `class!` macro zero cost.
Expand Down Expand Up @@ -67,6 +69,43 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
msg_send_id![msg_send_id![class!(MyObject), alloc], init]
};
```
* Updated `ffi` module to `objc-sys v0.2.0-beta.2`.
* **BREAKING**: Updated `encode` module `objc2-encode v2.0.0-pre.2`.

In particular, `Encoding` no longer has a lifetime parameter:
```rust
// Before
#[repr(C)]
pub struct NSRange {
pub location: usize,
pub length: usize,
}
unsafe impl Encode for NSRange {
const ENCODING: Encoding<'static> = Encoding::Struct(
"_NSRange", // This is how the struct is defined in C header files
&[usize::ENCODING, usize::ENCODING]
);
}
unsafe impl RefEncode for NSRange {
const ENCODING_REF: Encoding<'static> = Encoding::Pointer(&Self::ENCODING);
}

// After
#[repr(C)]
pub struct NSRange {
pub location: usize,
pub length: usize,
}
unsafe impl Encode for NSRange {
const ENCODING: Encoding = Encoding::Struct(
"_NSRange", // This is how the struct is defined in C header files
&[usize::ENCODING, usize::ENCODING]
);
}
unsafe impl RefEncode for NSRange {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
```

### Deprecated
* Depreacted `msg_send_bool!` in favour of new functionality on `msg_send!`
Expand Down
8 changes: 4 additions & 4 deletions objc2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "objc2"
version = "0.3.0-beta.1" # Remember to update html_root_url in lib.rs
version = "0.3.0-beta.2" # Remember to update html_root_url in lib.rs
authors = ["Steven Sheldon", "Mads Marquart <[email protected]>"]
edition = "2021"

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

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

# Provide methods to convert between `uuid::Uuid` and `objc2::foundation::NSUUID`
uuid = { version = "1.1.2", optional = true, default-features = false }
Expand Down
8 changes: 6 additions & 2 deletions objc2/src/foundation/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,17 +432,21 @@ mod tests {
}

#[test]
#[cfg_attr(
feature = "apple",
ignore = "this works differently on different framework versions"
)]
fn test_iter_no_retain() {
let obj = Id::into_shared(RcTestObject::new());
let array = NSArray::from_slice(&[obj]);
let mut expected = ThreadTestData::current();

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

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

let iter = array.iter_fast();
Expand Down
2 changes: 1 addition & 1 deletion objc2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
#![warn(clippy::cargo)]
#![warn(clippy::ptr_as_ptr)]
// Update in Cargo.toml as well.
#![doc(html_root_url = "https://docs.rs/objc2/0.3.0-beta.1")]
#![doc(html_root_url = "https://docs.rs/objc2/0.3.0-beta.2")]

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

0 comments on commit 9ccb3a4

Please sign in to comment.