Skip to content
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

Replace Objective-C implemented delegates with Dart implementations #1218

Merged
merged 60 commits into from
Oct 23, 2024

Conversation

brianquinlan
Copy link
Collaborator

@brianquinlan brianquinlan commented May 30, 2024


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@brianquinlan brianquinlan marked this pull request as draft May 30, 2024 23:10
@github-actions github-actions bot added the package:cupertino_http Issues related to package:cupertino_http label May 30, 2024
Copy link

github-actions bot commented Sep 3, 2024

PR Health

Changelog Entry
Package Changed Files
package:http pkgs/http/pubspec.yaml
package:web_socket pkgs/web_socket/pubspec.yaml

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

Coverage ⚠️
File Coverage
pkgs/cupertino_http/example/integration_test/http_url_response_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/main.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/url_cache_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/url_request_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/url_response_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/url_session_task_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/url_session_test.dart 💔 Not covered
pkgs/cupertino_http/example/integration_test/utils_test.dart 💔 Not covered
pkgs/cupertino_http/lib/src/cupertino_api.dart 💔 Not covered
pkgs/cupertino_http/lib/src/cupertino_client.dart 💔 Not covered
pkgs/cupertino_http/lib/src/cupertino_web_socket.dart 💔 Not covered
pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart 💔 Not covered
pkgs/cupertino_http/lib/src/utils.dart 💔 Not covered

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check.

License Headers ⚠️
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/cronet_http/lib/src/jni/jni_bindings.dart
pkgs/http/example/main.dart
pkgs/http2/test/src/flowcontrol/mocks.mocks.dart
pkgs/http_client_conformance_tests/example/client_test.dart
pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart
pkgs/http_client_conformance_tests/lib/src/dummy_isolate.dart
pkgs/http_client_conformance_tests/lib/src/multipart_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/multipart_server_web.dart
pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart
pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart
pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart
pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart
pkgs/http_client_conformance_tests/lib/src/request_cookies_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/request_cookies_server_web.dart
pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart
pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart
pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart
pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart
pkgs/http_client_conformance_tests/lib/src/response_cookies_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/response_cookies_server_web.dart
pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart
pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart
pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart
pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart
pkgs/http_parser/test/example_test.dart
pkgs/http_profile/lib/http_profile.dart
pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart
pkgs/java_http/lib/src/third_party/java/io/InputStream.dart
pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart
pkgs/java_http/lib/src/third_party/java/io/_package.dart
pkgs/java_http/lib/src/third_party/java/lang/System.dart
pkgs/java_http/lib/src/third_party/java/lang/_package.dart
pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart
pkgs/java_http/lib/src/third_party/java/net/URL.dart
pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart
pkgs/java_http/lib/src/third_party/java/net/_package.dart
pkgs/ok_http/lib/src/jni/bindings.dart
pkgs/web_socket/example/web_socket_example.dart
pkgs/web_socket/lib/testing.dart
pkgs/web_socket_conformance_tests/example/client_test.dart
pkgs/web_socket_conformance_tests/lib/src/close_local_server_vm.dart
pkgs/web_socket_conformance_tests/lib/src/close_local_server_web.dart
pkgs/web_socket_conformance_tests/lib/src/close_remote_server_vm.dart
pkgs/web_socket_conformance_tests/lib/src/close_remote_server_web.dart
pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_vm.dart
pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_web.dart
pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_vm.dart
pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_web.dart
pkgs/web_socket_conformance_tests/lib/src/echo_server_vm.dart
pkgs/web_socket_conformance_tests/lib/src/echo_server_web.dart
pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_vm.dart
pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_web.dart
pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_vm.dart
pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_web.dart
pkgs/web_socket_conformance_tests/lib/src/protocol_server_vm.dart
pkgs/web_socket_conformance_tests/lib/src/protocol_server_web.dart

This check can be disabled by tagging the PR with skip-license-check.

@brianquinlan brianquinlan marked this pull request as ready for review October 22, 2024 18:11
Copy link

@liamappelbe liamappelbe left a comment

Choose a reason for hiding this comment

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

So much deleted code! LGTM

}
});

final downloadDelegate = objc.getProtocol('NSURLSessionDownloadDelegate');

Choose a reason for hiding this comment

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

I've filed dart-lang/native#1675 so you won't have to do this in future.

@@ -4,10 +4,11 @@ description: >-
A macOS/iOS Flutter plugin that provides access to the Foundation URL
Loading System.
repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http
publish_to: no
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
publish_to: no
publish_to: none

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The publish_to directive was there by accident.

Copy link

Package publishing

Package Version Status Publish tag (post-merge)
package:http2 2.3.1 ready to publish http2-v2.3.1
package:cronet_http 1.3.3-wip WIP (no publish necessary)
package:http 1.2.3-wip WIP (no publish necessary)
package:http_parser 4.1.1 already published at pub.dev
package:http_profile 0.1.1-wip WIP (no publish necessary)
package:ok_http 0.1.1-wip WIP (no publish necessary)
package:web_socket 0.1.6 already published at pub.dev
package:cupertino_http 1.5.2-wip (error) pubspec version (1.5.2-wip) and changelog (2.0.0-wip) don't agree

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@brianquinlan brianquinlan merged commit d921e48 into dart-lang:master Oct 23, 2024
33 of 38 checks passed
@brianquinlan brianquinlan deleted the dart_protocol branch October 23, 2024 17:25
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Oct 28, 2024
…ecosystem, fixnum, http, lints, logging, markdown, path, sync_http, test, typed_data, vector_math, web

Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (https://github.com/dart-lang/async/compare/5f70a99..d6a6a4d):
  d6a6a4d  2024-10-17  Moritz  Update README.md before archiving (dart-archive/async#287)

clock (https://github.com/dart-lang/clock/compare/7956d60..8dfee80):
  8dfee80  2024-10-28  Moritz  Update README.md (dart-archive/clock#70)

collection (https://github.com/dart-lang/collection/compare/887b826..96afcc2):
  96afcc2  2024-10-21  Moritz  Update README.md before archiving (dart-archive/collection#362)

convert (https://github.com/dart-lang/convert/compare/d361833..836082a):
  836082a  2024-10-17  Moritz  Update README.md before archiving (dart-archive/convert#110)

core (https://github.com/dart-lang/core/compare/2a436d5..9ad6888):
  9ad68884  2024-10-25  Kevin Moore  os_detect: bump lints and SDK versions (dart-lang/core#713)

crypto (https://github.com/dart-lang/crypto/compare/3d26ef4..255edfb):
  255edfb  2024-10-17  Moritz  Update README.md before archiving (dart-archive/crypto#184)

dartdoc (https://github.com/dart-lang/dartdoc/compare/73344a2..5168f81):
  5168f81a  2024-10-27  Parker Lougheed  Remove unnecessary and unused styles (dart-lang/dartdoc#3918)
  d4876f94  2024-10-25  Parker Lougheed  Compress generated css by configuring sass output style (dart-lang/dartdoc#3919)
  d83146fa  2024-10-25  Parker Lougheed  Generate included css using sass (dart-lang/dartdoc#3917)
  4d461298  2024-10-24  Parker Lougheed  Update to Dart 3.5 and web 1.1 (dart-lang/dartdoc#3915)

ecosystem (https://github.com/dart-lang/ecosystem/compare/2d58550..66ddc4f):
  66ddc4f  2024-10-28  Devon Carew  refactor the CI to use per-package workflow config files (dart-lang/ecosystem#312)
  673428a  2024-10-24  Devon Carew  ignore redundant 'type-' labels (dart-lang/ecosystem#309)
  d5c8c18  2024-10-15  Devon Carew  remove the 'version' section from the health checks (dart-lang/ecosystem#305)

fixnum (https://github.com/dart-lang/fixnum/compare/83293b8..8543972):
  8543972  2024-10-17  Moritz  Update README.md before archiving (dart-archive/fixnum#134)

http (https://github.com/dart-lang/http/compare/5e2281e..f5ec11c):
  f5ec11c  2024-10-25  dependabot[bot]  Bump the github-actions group across 1 directory with 5 updates (dart-lang/http#1392)
  bd8eb4b  2024-10-24  Brian Quinlan  Remove package:java_http (dart-lang/http#1389)
  d921e48  2024-10-23  Brian Quinlan  Replace Objective-C implemented delegates with Dart implementations (dart-lang/http#1218)

lints (https://github.com/dart-lang/lints/compare/5016d63..19d99bc):
  19d99bc  2024-10-21  Moritz  Update README.md before archiving (dart-lang/lints#214)

logging (https://github.com/dart-lang/logging/compare/6fa0560..a41a508):
  a41a508  2024-10-18  Moritz  Update README.md (dart-archive/logging#175)

markdown (https://github.com/dart-lang/markdown/compare/d53feae..207bb44):
  207bb44  2024-10-16  andrechalella  Update pub run syntax and remove 404 images (dart-lang/markdown#625)
  62153ee  2024-10-16  andrechalella  Fix `RangeError` hazards in links (dart-lang/markdown#624)

path (https://github.com/dart-lang/path/compare/e969f42..7e3d5d8):
  7e3d5d8  2024-10-17  Moritz  Update README.md (dart-archive/path#172)

sync_http (https://github.com/dart-lang/sync_http/compare/91c0dd5..44b5913):
  44b5913  2024-10-28  Devon Carew  Update analysis_options.yaml (google/sync_http.dart#51)
  df54f0d  2024-10-28  dependabot[bot]  Bump actions/checkout from 4.1.7 to 4.2.0 (google/sync_http.dart#50)

test (https://github.com/dart-lang/test/compare/73e30fb..fe38650):
  fe386504  2024-10-22  Nate Bosch  Remove deprecated lint package_api_docs (dart-lang/test#2411)

typed_data (https://github.com/dart-lang/typed_data/compare/6abfafd..b269d39):
  b269d39  2024-10-18  Moritz  Update README.md before archiving (dart-archive/typed_data#94)

vector_math (https://github.com/google/vector_math.dart/compare/2cfbe2c..da9889f):
  da9889f  2024-10-16  dependabot[bot]  Bump the github-actions group across 1 directory with 2 updates (google/vector_math.dart#332)
  33d5ecb  2024-10-15  Devon Carew  Update dependabot.yaml (google/vector_math.dart#331)

web (https://github.com/dart-lang/web/compare/8478cd2..d3a61aa):
  d3a61aa  2024-10-12  Parker Lougheed  Remove deprecated package_api_docs lint (dart-lang/web#315)

Change-Id: I465d31409f68a0d6f10a60ffb9cfd505957f79e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392200
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Devon Carew <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:cupertino_http Issues related to package:cupertino_http package:http_client_conformance_tests package:http type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest objective_c changes incompatible with cupertino_http
3 participants