Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Pass a Uri to package:http APIs #3309

Merged
merged 4 commits into from Dec 11, 2020
Merged

Pass a Uri to package:http APIs #3309

merged 4 commits into from Dec 11, 2020

Conversation

natebosch
Copy link
Contributor

Prepare for dart-lang/http#375

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @natebosch, before merging we'll have to bump the version in the pubspec + CHANGELOG so this becomes publishable!

@natebosch
Copy link
Contributor Author

I bumped to a -dev version so it is clear this has changed since it was last published. https://github.com/dart-lang/sdk/wiki/External-Package-Maintenance#making-a-change

There is no need to publish just for this - it won't have any real impact for places where it is fetched from pub. Where this will make a difference is google3.

@ditman
Copy link
Member

ditman commented Dec 9, 2020

I need to do a quick real world test with this, I remember Safari having trouble when parsing Blob URLs before doing the ajax fetch. I'll merge this once that's done.

Also, there's a similar package: cross_file that might need a similar fix to this (but it's probably not imported into g3), I'll take care of that one!

@natebosch
Copy link
Contributor Author

I need to do a quick real world test with this, I remember Safari having trouble when parsing Blob URLs before doing the ajax fetch. I'll merge this once that's done.

There should be no impact. That Uri.parse call happens today already, it's just happening deep in the http functions instead of at the call site.

https://github.com/dart-lang/http/blob/d473635f0dbb72936664696162127c2209986356/lib/src/base_client.dart#L110

Also, there's a similar package: cross_file that might need a similar fix to this (but it's probably not imported into g3), I'll take care of that one!

Thanks!

Note that this won't have an impact on any package until it changes it's dependency constraints in pubspec.yaml. This will come with a major version bump in http. The main reason I need to do google3 packages in advance is because pubspec constraints don't have any impact there.

@natebosch
Copy link
Contributor Author

It looks like tests are failing due to the -dev suffix on the version I mentioned in #3309 (comment). This is a pattern that we use to indicate when the code in the repo does not match the code as published under that version, and until we go to do a publish we don't know whether the code will match.

Since this repo doesn't take that approach which is prefered - do you eagerly bump the version when the code changes even without user facing changes, or do you wait to bump the version until there is a user facing change to document in the changelog?

@ditman
Copy link
Member

ditman commented Dec 9, 2020

do you eagerly bump the version when the code changes even without user facing changes

@natebosch yes, let's bump the minor version and document in the CHANGELOG that this passes Uri objects instead of Strings to package:http methods. I can do this, now that you've touched the files themselves from the web UI, I think!

Thanks for the clarification about the major version and the links to the http source!

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix @natebosch!

natebosch and others added 4 commits December 10, 2020 17:26
There is no need to publish until there are other changes. This change
is only needed for places where it will be used with `package:http` at a
version newer than the pubspec constraint allows.
@google-cla
Copy link

google-cla bot commented Dec 11, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Dec 11, 2020
@ditman
Copy link
Member

ditman commented Dec 11, 2020

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Dec 11, 2020
@ditman ditman merged commit 163e7c2 into master Dec 11, 2020
@ditman ditman deleted the http-get-uri branch December 11, 2020 23:44
NickalasB added a commit to NickalasB/plugins that referenced this pull request Dec 12, 2020
* master:
  [q-w] Update Flutter SDK constraint (flutter#3323)
  [i-p] Update Flutter SDK constraint (flutter#3322)
  [d-g] Update Flutter SDK constraint (flutter#3321)
  [a-c] Update Flutter SDK constraint (flutter#3320)
  [image_picker_platform_interface] Pass Uri to package:http APIs (flutter#3309)
  Exclude null-safe plugins from testing on stable (flutter#3318)
  [documentation] [url_launcher] fix for readme code sample (flutter#3308)

# Conflicts:
#	packages/webview_flutter/CHANGELOG.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 16, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 16, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 16, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 16, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 17, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 18, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 19, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 19, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 19, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 20, 2020
amantoux pushed a commit to amantoux/plugins that referenced this pull request Feb 8, 2021
adsonpleal pushed a commit to nubank/plugins that referenced this pull request Feb 26, 2021
samandmoore added a commit to Betterment/plugins that referenced this pull request Apr 21, 2021
…m-changes

* upstream-share-final-null-release: (233 commits)
  [q-w] Update Flutter SDK constraint (flutter#3323)
  [i-p] Update Flutter SDK constraint (flutter#3322)
  [d-g] Update Flutter SDK constraint (flutter#3321)
  [a-c] Update Flutter SDK constraint (flutter#3320)
  [image_picker_platform_interface] Pass Uri to package:http APIs (flutter#3309)
  Exclude null-safe plugins from testing on stable (flutter#3318)
  [documentation] [url_launcher] fix for readme code sample (flutter#3308)
  [camera] Add zoom support to platform interface (flutter#3312)
  update analysis options for nnbd (flutter#3319)
  [camera] Suppress unchecked cast warning in java test (flutter#3316)
  [image_picker] [integration_test] Fixes to make the tree green (flutter#3317)
  [camera] Expanded platform interface to support setting flash mode (flutter#3313)
  [Espresso] Android Code Inspection and Clean up (flutter#3111)
  [camera] Add `camera_platform_interface` package (flutter#3253)
  [camera] Support Android 30 (flutter#3299)
  bump integration test to 1.0.0 (flutter#3295)
  [android_alarm_manager] fix AndroidManifest.xml for android lint issue "XML tag has empty body" (flutter#3288)
  Use testWidgets instead of test to fix failures not surfacing on CI (flutter#3279)
  [file_selector_platform_interface] Migrate to cross_file package (flutter#3286)
  Fix broken link (flutter#3280)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants