-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ECO-4968] Added missed NS_SWIFT_SENDABLE
#1973
Conversation
WalkthroughThe pull request introduces the Changes
Assessment against linked issues
Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (1)
Source/ARTDataQuery.m (1)
Line range hint
100-131
: LGTM, but consider adding documentation comments.The new instance variable
_untilAttach
and its corresponding getter and setter methods are implemented correctly in theARTRealtimeHistoryQuery
class. The setter method includes the necessary safeguard to prevent changes when the object is frozen, and the exception provides a clear reason for the failure.However, the purpose of the
untilAttach
property is not immediately clear from its name. Consider adding documentation comments to clarify its behavior and usage.+ /** + * Whether the query should continue until an attachment occurs. + */ - (BOOL)untilAttach { return _untilAttach; } + /** + * Sets whether the query should continue until an attachment occurs. + * + * @param value Whether the query should continue until an attachment occurs. + * @throws NSObjectInaccessibleException If the query is frozen. + */ - (void)setUntilAttach:(BOOL)value { ... }
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (19)
- Ably.xcodeproj/project.pbxproj (9 hunks)
- Source/ARTBaseQuery.m (1 hunks)
- Source/ARTDataQuery.m (3 hunks)
- Source/ARTRealtimePresence.m (3 hunks)
- Source/ARTRest.m (1 hunks)
- Source/ARTRestChannel.m (1 hunks)
- Source/ARTRestPresence.m (4 hunks)
- Source/ARTStats.m (2 hunks)
- Source/Ably.modulemap (1 hunks)
- Source/include/Ably/ARTBaseQuery.h (1 hunks)
- Source/include/Ably/ARTDataQuery.h (3 hunks)
- Source/include/Ably/ARTRealtimePresence.h (1 hunks)
- Source/include/Ably/ARTRestPresence.h (2 hunks)
- Source/include/Ably/ARTStats.h (1 hunks)
- Test/Tests/RealtimeClientChannelTests.swift (1 hunks)
- Test/Tests/RealtimeClientPresenceTests.swift (2 hunks)
- Test/Tests/RestClientChannelTests.swift (1 hunks)
- Test/Tests/RestClientPresenceTests.swift (1 hunks)
- Test/Tests/RestClientStatsTests.swift (1 hunks)
Files skipped from review due to trivial changes (1)
- Source/ARTBaseQuery.m
Additional comments not posted (43)
Source/include/Ably/ARTDataQuery.h (4)
2-2
: LGTM!The import statement is correct and consistent with the change in the base class of
ARTDataQuery
.
17-17
: LGTM!The addition of the
NS_SWIFT_SENDABLE
attribute toARTDataQuery
is consistent with the PR objective to enhance compatibility with Swift's concurrency model. This change allows instances ofARTDataQuery
to be safely used across Swift concurrency domains.
45-45
: LGTM!The addition of the
NS_SWIFT_SENDABLE
attribute toARTRealtimeHistoryQuery
is consistent with the PR objective to enhance compatibility with Swift's concurrency model. This change allows instances ofARTRealtimeHistoryQuery
to be safely used across Swift concurrency domains.
18-18
: Verify the impact of inheriting fromARTBaseQuery
.The change in the base class of
ARTDataQuery
fromNSObject
toARTBaseQuery
suggests a refactoring effort to leverage common functionality from a base query class. While this is a good approach to promote code reuse and maintainability, it's crucial to ensure that this change doesn't break existing functionality or introduce unexpected behavior.Please run the following script to verify the impact of this change:
Source/include/Ably/ARTRestPresence.h (2)
5-5
: LGTM!The import statement is necessary and correctly placed to support the change in the inheritance structure of
ARTPresenceQuery
class.
14-15
: Verify the impact of the changes.The modifications to the
ARTPresenceQuery
class declaration look good! The changes align with the PR objectives and enhance the functionality of the class.However, please ensure that:
- The change in the inheritance structure does not introduce any unintended side effects or break existing functionality.
- All the necessary adjustments are made in the implementation file (
ARTRestPresence.m
) to accommodate the new inheritance structure.- The addition of the
NS_SWIFT_SENDABLE
attribute does not lead to any unexpected behavior or performance issues when used in Swift code.Run the following script to verify the impact of the changes:
Please review the results of the above tests and confirm if any additional changes are required to ensure the stability and correctness of the codebase.
Verification successful
Changes verified successfully.
The modifications to the
ARTPresenceQuery
class, including the change in inheritance and the addition of theNS_SWIFT_SENDABLE
attribute, have been verified. The usage and initialization patterns are consistent with the rest of the codebase, and no issues or unintended side effects were found. The changes align well with the PR objectives and enhance the functionality of the class.
- The
ARTPresenceQuery
class is used appropriately in both Objective-C and Swift code.- The inheritance from
ARTBaseQuery
is consistent with other query classes.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the changes to `ARTPresenceQuery` class. echo "Checking the usage of ARTPresenceQuery..." # Test 1: Search for the usage of `ARTPresenceQuery`. # Expect: Occurrences in the implementation file and Swift code (if any). rg --type objc --type swift -w $'ARTPresenceQuery' echo "Checking the initialization of ARTPresenceQuery..." # Test 2: Search for the initialization of `ARTPresenceQuery`. # Expect: Initialization using the designated initializers declared in the header file. rg --type objc --type swift -w $'ARTPresenceQuery alloc] init' echo "Checking the usage of ARTBaseQuery..." # Test 3: Search for the usage of `ARTBaseQuery`. # Expect: Occurrences in other query classes (if any). rg --type objc --type swift -w $'ARTBaseQuery'Length of output: 2445
Source/Ably.modulemap (1)
17-17
: LGTM!The addition of
ARTBaseQuery.h
to thePrivate
module of theAbly
framework appears to be a valid change that aligns with the PR objective of adding Swift concurrency annotations to query types. This change expands the module's internal capabilities related to query handling, as indicated by the AI-generated summary.Source/ARTDataQuery.m (4)
4-9
: LGTM!The new instance variables are declared correctly and follow good encapsulation practices by keeping them private to the class.
46-57
: LGTM!The getter and setter methods for the
start
property are implemented correctly. The setter method includes the necessary safeguard to prevent changes when the object is frozen, and the exception provides a clear reason for the failure.
72-83
: LGTM!The getter and setter methods for the
limit
property are implemented correctly. The setter method includes the necessary safeguard to prevent changes when the object is frozen, and the exception provides a clear reason for the failure.
85-96
: LGTM!The getter and setter methods for the
direction
property are implemented correctly. The setter method includes the necessary safeguard to prevent changes when the object is frozen, and the exception provides a clear reason for the failure.Source/ARTStats.m (3)
4-6
: LGTM!The addition of the
_unit
instance variable to theARTStatsQuery
class enhances its functionality by allowing the specification of a granularity unit for statistics queries. The default initialization toARTStatsGranularityMinute
in theinit
method provides a sensible default value. The code changes are consistent with the existing codebase and follow the Objective-C naming conventions.
39-41
: LGTM!The
unit
method provides a getter for the_unit
instance variable, allowing external code to retrieve the current granularity unit of the query. The method follows the Objective-C naming convention for getter methods and is simple and straightforward.
43-50
: LGTM!The
setUnit:
method provides a setter for the_unit
instance variable, allowing external code to modify the granularity unit of the query. The method follows the Objective-C naming convention for setter methods.The check to prevent modification of a frozen query object is important to maintain the integrity of the query once it has been passed to a receiver. The exception thrown in case of an attempt to modify a frozen query provides a clear and informative error message.
Source/ARTRestPresence.m (6)
17-21
: LGTM!The addition of the new instance variables
_limit
,_clientId
, and_connectionId
to theARTPresenceQuery
class aligns with the PR objectives. The variables are declared as private, which is a good practice for encapsulation, and the naming convention is consistent with the existing codebase.
56-67
: LGTM!The getter and setter methods for the
limit
property provide a clean interface for accessing and modifying the property. The check in the setter method to prevent modifications after the query is frozen is a good practice to maintain the integrity of the query, and the exception thrown provides a clear explanation of the error.
69-80
: LGTM!The getter and setter methods for the
clientId
property provide a clean interface for accessing and modifying the property. The check in the setter method to prevent modifications after the query is frozen is a good practice to maintain the integrity of the query, and the exception thrown provides a clear explanation of the error.
82-93
: LGTM!The getter and setter methods for the
connectionId
property provide a clean interface for accessing and modifying the property. The check in the setter method to prevent modifications after the query is frozen is a good practice to maintain the integrity of the query, and the exception thrown provides a clear explanation of the error.
176-177
: LGTM!Setting the
frozen
state of thequery
totrue
after it is used in theget
method is a good practice to ensure that the query parameters cannot be altered post-processing. This change aligns with the PR objectives of enhancing the robustness of theARTPresenceQuery
class by enforcing stricter control over its state and parameters.
223-224
: LGTM!Setting the
frozen
state of thequery
totrue
after it is used in thehistory
method is a good practice to ensure that the query parameters cannot be altered post-processing. This change aligns with the PR objectives of enhancing the robustness of theARTPresenceQuery
class by enforcing stricter control over its state and parameters.Source/include/Ably/ARTRealtimePresence.h (1)
13-13
: LGTM!The addition of the
NS_SWIFT_SENDABLE
annotation to theARTRealtimePresenceQuery
interface is a valid change that enhances compatibility with Swift's concurrency model. It aligns with the PR objectives and does not alter the existing functionality or logic of the interface.Source/include/Ably/ARTStats.h (1)
33-33
: LGTM!The addition of the
NS_SWIFT_SENDABLE
attribute to theARTStatsQuery
interface is a valid change that aligns with the PR objectives. It ensures that instances of this type can be safely used across concurrency domains in Swift, enhancing compatibility with Swift's concurrency model.Test/Tests/RestClientStatsTests.swift (1)
114-118
: LGTM!The test case is well-structured and follows the given-when-then pattern. It is focused on a specific behavior and has clear assertions. The use of
tryInObjC
to capture the Objective-C exception and theXCTAssertNotNil
andXCTAssertEqual
assertions to verify the expected behavior are good practices.Source/ARTRestChannel.m (1)
164-165
: LGTM!Freezing the
query
object after this point is a good practice to ensure immutability and thread-safety.Verify if the
frozen
property is part of the public API ofARTDataQuery
. If so, consider adding documentation to explain its purpose and behavior.Verification successful
Confirm
frozen
Property as Public APIThe
frozen
property is part of the public API ofARTDataQuery
through its inheritance fromARTBaseQuery
. Consider adding documentation to explain its purpose and behavior, as it ensures the immutability of the query object.
Source/include/Ably/ARTBaseQuery.h
:@property (nonatomic, getter=isFrozen) BOOL frozen;
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if `frozen` is a public property of `ARTDataQuery` and suggest adding documentation if necessary. # Test: Search for the declaration of the `frozen` property in `ARTDataQuery`. # Expect: The property to be declared in the header file, indicating it's part of the public API. rg --type objc $'@property.*frozen' -- '*.h'Length of output: 89
Script:
#!/bin/bash # Locate the definition of the `ARTDataQuery` class to find the correct file. ast-grep --lang objc --pattern 'interface ARTDataQuery { $$$ }' # Once the file is located, search for the `frozen` property declaration within it. # This will help determine if `frozen` is part of the public API. fd -e h | xargs rg --type objc $'@property.*frozen'Length of output: 542
Script:
#!/bin/bash # Search for the definition of `ARTDataQuery` to check its inheritance hierarchy. rg --type objc 'interface ARTDataQuery' -A 5Length of output: 845
Test/Tests/RestClientPresenceTests.swift (1)
78-99
: LGTM!The test case is well-structured and comprehensively covers the expected behavior of the
limit
property on theARTPresenceQuery
class. The addition of the exception handling tests for the frozenquery
object aligns with the PR objective of adding theNS_SWIFT_SENDABLE
annotation to query types.I particularly like the improvement in the test case where a new instance of
ARTPresenceQuery
(query2
) is used for the successful call tochannel.presence.get(query)
with a limit of 1000, instead of reusing the frozenquery
object. This ensures that the test accurately reflects the expected behavior when the query is not frozen.Source/ARTRest.m (1)
670-671
: LGTM!Freezing the
query
object before validating the limit and executing the request is a good practice to ensure the query remains unmodified throughout thestats
method. This change enhances the robustness and predictability of the method.Source/ARTRealtimePresence.m (3)
34-36
: LGTM!The
waitForSync
method provides public read access to the private_waitForSync
instance variable. This flag seems to be used to control whether the query should wait for synchronization before returning results.
38-45
: LGTM!The
setWaitForSync:
method allows setting the value of the private_waitForSync
flag. The check to prevent modification of a frozen query is a good practice to ensure immutability and avoid unexpected behavior. Throwing an exception with a clear message is an appropriate way to handle the case when attempting to modify a frozen query.
239-239
: LGTM!Setting the
frozen
property totrue
ensures that the query becomes immutable after being passed to theget
method. This aligns with the immutability check introduced in thesetWaitForSync:
method and helps maintain a consistent state throughout the processing of theget
request.Test/Tests/RestClientChannelTests.swift (6)
595-618
: LGTM!The test covers the scenario described in the linked issue #1074 and verifies that publishing messages with no clientId in the client options and credentials that can assume any clientId does not fail.
Line range hint
619-630
: LGTM!The test verifies that publishing with a mismatched clientId fails with an expected error message.
Line range hint
631-694
: LGTM!The test verifies that the extras are correctly included when publishing a message and can be retrieved from history.
Line range hint
695-715
: LGTM!The test verifies that the attributes supplied by the caller, such as id, name, and data, are correctly included in the encoded message when publishing.
Line range hint
716-751
: LGTM!The test verifies that the channel status API returns a channel details object populated with the expected channel metrics when there are subscribers. It checks metrics such as connections, publishers, subscribers, presenceMembers, presenceConnections, and presenceSubscribers.
Line range hint
752-771
: LGTM!The test verifies that when a channel name contains a slash character, it is correctly URL-encoded in the REST request path. This ensures that the slash is properly handled and does not cause issues with the request URL.
Test/Tests/RealtimeClientPresenceTests.swift (2)
3248-3252
: LGTM!Good test case to verify that the
waitForSync
property ofARTRealtimePresenceQuery
cannot be modified after initialization, as expected. The object should be frozen.
3555-3561
: Looks good!Another good test to ensure the
untilAttach
property ofARTRealtimeHistoryQuery
is also frozen after initialization, matching the immutability semantics tested forwaitForSync
above.Test/Tests/RealtimeClientChannelTests.swift (1)
3664-3669
: Test looks good!The test correctly verifies that when publishing a message with both name and data set:
- The client connects and reaches the connected state
- The published message's name and data are sent in the ProtocolMessage
- The ProtocolMessage also contains the correct connectionId
Ably.xcodeproj/project.pbxproj (5)
302-304
: LGTM!Adding
ARTBaseQuery.h
to the "Headers" build phase with the private attribute is the correct way to include it in the project.
305-307
: LGTM!Adding
ARTBaseQuery.m
to the "Sources" build phase is the correct way to include it in the project.
1254-1255
: LGTM!The file references for
ARTBaseQuery.h
andARTBaseQuery.m
are correctly added. The header file is placed in theinclude/Ably
directory, and the implementation file is at the root level, which follows the project's file structure conventions.
2136-2137
: LGTM!Adding
ARTBaseQuery.h
andARTBaseQuery.m
to this group of files is appropriate, as it keeps related files together in the project structure.
2245-2245
: LGTM!Adding
ARTBaseQuery.h
to the "Headers" build phase is consistent with the previous changes and ensures that the header file is included in the appropriate build phase.
…code 16) I've added `NS_SWIFT_SENDABLE` to other query types as well. Also added NS_SWIFT_SENDABLE to `ARTChannelProperties`.
179db8e
to
bfaaba1
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Outside diff range and nitpick comments (1)
Test/Tests/RestClientChannelsTests.swift (1)
6-6
: Improve the code comment for clarityConsider rephrasing the comment to be more informative and professional. Instead of stating that "Swift isn't yet smart enough," you might specify the limitation or refer to the issue with bridging Objective-C APIs in Swift versions prior to Swift 6.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- Source/ARTDataEncoder.m (2 hunks)
- Test/Test Utilities/TestUtilities.swift (2 hunks)
- Test/Tests/RealtimeClientChannelsTests.swift (1 hunks)
- Test/Tests/RestClientChannelsTests.swift (1 hunks)
Additional comments not posted (2)
Test/Tests/RestClientChannelsTests.swift (1)
5-11
: Conditional conformance implementation is appropriateThe use of conditional compilation to provide retroactive conformance to
Sequence
for Swift versions 6 and above is a good approach to maintain compatibility across different Swift versions.Test/Tests/RealtimeClientChannelsTests.swift (1)
5-12
: Appropriate use of@retroactive
attribute for Swift 6 and aboveThe conditional compilation correctly applies the
@retroactive
attribute to theSequence
conformance for Swift versions 6 and above. This ensures compatibility with the latest Swift features while maintaining functionality for earlier versions of Swift.Also applies to: 19-19
42e5ba9
to
75e9554
Compare
LGTM - I checked this against the sending and receiving messages work and I have no warnings 🎉 worth checking if @lawrence-forooghian wants to give it another once over |
Also |
NS_SWIFT_SENDABLE
to all query typesNS_SWIFT_SENDABLE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range and nitpick comments (2)
Source/include/Ably/ARTChannelOptions.h (2)
Line range hint
20-20
: Address TODO comment for missing docstring.There's a TODO comment indicating a missing docstring for the
initWithCipher:
method. It would be beneficial to add a proper documentation comment here to improve code clarity and maintainability.Consider adding a docstring that explains the purpose of this method, its parameters, and return value. For example:
/** * Initializes a new instance of ARTChannelOptions with the specified cipher parameters. * * @param cipherParams The cipher parameters to be used for encryption. Pass nil for no encryption. * @return An initialized ARTChannelOptions instance. */ - (instancetype)initWithCipher:(id<ARTCipherParamsCompatible> _Nullable)cipherParams;
Line range hint
28-30
: Enhance docstring forinitWithCipherKey:
method.While the current docstring provides basic information, it could be more detailed to improve clarity and usability.
Consider expanding the docstring to provide more context and details:
/** * Creates an ARTChannelOptions object with encryption enabled using the specified key. * * @param key A private key used to encrypt and decrypt payloads. The key should be compatible with the ARTCipherKeyCompatible protocol. * * @return An initialized ARTChannelOptions instance with encryption enabled. * * @note This method simplifies the process of setting up channel encryption by allowing you to provide just the key. For more advanced encryption options, use initWithCipher: instead. */ - (instancetype)initWithCipherKey:(id<ARTCipherKeyCompatible>)key;
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- Source/include/Ably/ARTChannelOptions.h (1 hunks)
- Source/include/Ably/ARTRealtimeChannelOptions.h (1 hunks)
Additional comments not posted (3)
Source/include/Ably/ARTChannelOptions.h (1)
11-11
: LGTM:NS_SWIFT_SENDABLE
attribute added correctly.The addition of the
NS_SWIFT_SENDABLE
attribute to theARTChannelOptions
interface is correct and aligns with the PR objectives. This change enhances compatibility with Swift's concurrency model and addresses potential warnings in Xcode 16.To ensure consistency across the codebase, let's check if other similar types have been annotated:
This will help us identify if there are other interfaces that might benefit from the same annotation.
Verification successful
LGTM:
NS_SWIFT_SENDABLE
attribute added correctly.The addition of the
NS_SWIFT_SENDABLE
attribute to theARTChannelOptions
interface is correct and aligns with the PR objectives. This change enhances compatibility with Swift's concurrency model and maintains consistency with similar annotations across the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for other types that might need NS_SWIFT_SENDABLE annotation # Search for interface declarations in header files rg --type objc -g '*.h' '^\s*@interface' -A 1 # Search for NS_SWIFT_SENDABLE usage rg --type objc -g '*.h' 'NS_SWIFT_SENDABLE'Length of output: 43252
Source/include/Ably/ARTRealtimeChannelOptions.h (2)
Line range hint
8-8
: Acknowledge correct use ofNS_SWIFT_SENDABLE
onARTChannelMode
The
NS_SWIFT_SENDABLE
attribute onARTChannelMode
is correctly applied. This is consistent with the goal of improving Swift concurrency support throughout the codebase.To improve documentation, consider adding a comment explaining the thread-safety implications, such as:
/** * ARTChannelMode is marked as Sendable, indicating that it can be safely used across different threads or tasks in Swift concurrency contexts. * This is inherently true for option sets, which are value types. */
Line range hint
1-48
: Summary: Improved Swift concurrency supportThe changes in this file successfully improve Swift concurrency support by adding
NS_SWIFT_SENDABLE
toARTRealtimeChannelOptions
. This, along with the existing annotation onARTChannelMode
, enhances the compatibility of these types with Swift's concurrency model.These modifications align well with the PR objectives and address the concerns raised in the linked issues. The changes should help reduce warnings in Xcode 16 and improve the overall robustness of the codebase when used in concurrent Swift contexts.
To further enhance the documentation, consider adding thread-safety notes to both
ARTChannelMode
andARTRealtimeChannelOptions
as suggested in the previous comments.
@maratal the Xcode 16 and Swift 6 stuff is unrelated to this PR; please can you put it in a separate PR? |
/// :nodoc: | ||
@interface ARTBaseQuery : NSObject | ||
|
||
@property (nonatomic, getter=isFrozen) BOOL frozen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this property part of the public API?
@@ -3245,6 +3245,11 @@ class RealtimeClientPresenceTests: XCTestCase { | |||
let params = ARTRealtimePresenceQuery() | |||
params.waitForSync = true | |||
channel.presence.get(params, callback: callback) | |||
let exception = tryInObjC { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in another PR, it's quite confusing to have this extra stuff in tests without even an explanation of why it's there; it isn't obviously related to the core of the test. I think best to go in a separate test. Ditto elsewhere.
@@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
/** | |||
* Passes additional properties to an `ARTRestChannel` object, such as encryption. | |||
*/ | |||
NS_SWIFT_SENDABLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have you marked the mutable options / query types as NS_SWIFT_SENDABLE
? They’re not sendable; they don't synchronise access to their mutable state and aren't safe to share between isolation domains. You didn't mark ARTChannelOptions
as sendable in #1963; why would these types be different?
I think it would be helpful for you to explain in more detail what was the motivation for the current PR, so that we can figure out how to solve it. Marking these types (at least in their current state) as sendable isn't correct.
As mentioned by @lawrence-forooghian, it's wrong to mark those types as |
I’m not sure "solved" is the right word; more like "worked around in Chat for now" |
By analogy with
ARTRealtimePresenceQuery
(which causes warning in Xcode 16) I've addedNS_SWIFT_SENDABLE
to other query types as well.Closes #1971
Summary by CodeRabbit
Release Notes
New Features
ARTBaseQuery
component, enhancing query capabilities within the Ably framework.ARTChannelOptions
andARTRealtimeChannelOptions
for improved interoperability.Bug Fixes
nil
values during encoding and decoding processes to prevent unexpected behavior.Tests