Skip to content

Add ConnectionCollection and Swift test#167962

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
cbracken:connection_collection
Apr 29, 2025
Merged

Add ConnectionCollection and Swift test#167962
auto-submit[bot] merged 5 commits into
flutter:masterfrom
cbracken:connection_collection

Conversation

@cbracken

@cbracken cbracken commented Apr 28, 2025

Copy link
Copy Markdown
Member

This rewrites the ConnectionCollection C++ class and its test to Swift. This ensures we're successfully able to write/run XCTests written in Swift.

It also adds new tests for ConnectionCollection:

  • Verifies connection IDs are > 0.
  • Verifies connection IDs are unique.
  • Verifies the IDs of error connections are as specified.

Issue: #144791
Issue: #167592

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cbracken cbracken requested a review from a team as a code owner April 28, 2025 22:13
@github-actions github-actions Bot added platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels Apr 28, 2025
@cbracken

Copy link
Copy Markdown
Member Author

This is currently stacked on top of #167958. The second commit is the commit to review.

@cbracken cbracken force-pushed the connection_collection branch 3 times, most recently from e6cf0e3 to 0eacd5b Compare April 28, 2025 22:18
class ConnectionCollection {
public:
typedef int64_t Connection;
static const Connection kInvalidConnection = 0;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsValidConnection below was unused, which makes this transitively unused.

#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_CONNECTION_COLLECTION_H_

#include <cstdint>
#include <map>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have been using std::unordered_map which has lower overhead when ordering is not required.

@cbracken cbracken force-pushed the connection_collection branch from 0eacd5b to 2e4144f Compare April 28, 2025 22:33
This rewrites the ConnectionCollection C++ class and its test to Swift.
This is to ensure we're successfully able to write/run XCTests written
in Swift.

It also adds a new test for ConnectionCollection that verifies the
IDs of error connections.

Issue: flutter#167592
@cbracken cbracken force-pushed the connection_collection branch from 4994b0e to 4b946bc Compare April 28, 2025 23:44
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 28, 2025
@cbracken cbracken force-pushed the connection_collection branch from f5fcdb7 to 004a6b0 Compare April 28, 2025 23:57
@auto-submit

auto-submit Bot commented Apr 29, 2025

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/167962, because - The status or check suite Linux linux_license has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 29, 2025
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 29, 2025
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 29, 2025
Merged via the queue into flutter:master with commit b0e52e5 Apr 29, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
This rewrites the ConnectionCollection C++ class and its test to Swift.
This ensures we're successfully able to write/run XCTests written in
Swift.

It also adds new tests for ConnectionCollection:
* Verifies connection IDs are > 0.
* Verifies connection IDs are unique.
* Verifies the IDs of error connections are as specified.

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants