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

Updated dependencies to Dart3/Flutter 3.10 compatible ones #38

Closed

Conversation

MagnusJohansson
Copy link

Update the SDK to v3, additional updates for various packages

Copy link
Owner

@kentcb kentcb 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 PR! Left some comments

pubspec.yaml Outdated
@@ -1,21 +1,21 @@
name: azure_application_insights
description: A Dart client to integrate with Azure's Application Insights service
version: 3.1.0
version: 3.1.1
Copy link
Owner

Choose a reason for hiding this comment

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

Since the SDK major version has incremented, I think we should bump this package to version 4.0.0?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I would say it's a good idea. I've updated the PR.

logging: ^1.0.2
meta: ^1.3.0
stack_trace: ^1.10.0
http: '>=0.13.6 <2.0.0'
Copy link
Owner

Choose a reason for hiding this comment

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

Why the change in syntax here? Can we just do ^1.0.0?

Copy link
Author

@MagnusJohansson MagnusJohansson Jun 3, 2023

Choose a reason for hiding this comment

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

For sure you can go with a single entry ^1.0.0. But then everybody who are using this package are forced to also use the http package version 1.0.0 - <2.0.0.
If you use '>=0.13.6 <2.0.0' , you will be compatible with http version 0.13.6 up to (but not including) 2.0.0.
In other words, both developers who must be on legacy 0.x.x can do so , as well as devs who are using the later 1.x.x

Specifying a single version (with caret): ^0.13.6 is the same as '>=0.13.6 <1.0.0' (i.e. excluding v1.0.0).

Reference:
Caret syntax
Versioning

Copy link
Owner

Choose a reason for hiding this comment

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

Ah, I get it now. I thought that using SDK 3 would require the use of http 1.0.0 onwards, but I see that it's still possible to use older versions with newer SDKs.

@kentcb
Copy link
Owner

kentcb commented Jun 4, 2023

Looks like there are some problems with the build, presumably as a result of SDK 3. I don't have time right now to dig in, but am happy to do so when I free up. If you're keen, feel free to take a look @MagnusJohansson.

@MagnusJohansson
Copy link
Author

MagnusJohansson commented Jun 4, 2023

Yes, I see... it seems that the Dart team in their infinite wisdom decided to mark the ByteStream class as final (instead of interface) which prevents Mockito to mock it...
I raised an issue with them, let's see what their response is.
I suppose a workaround , as suggested in this Mockito issue, is to create a wrapper around http.

@MagnusJohansson
Copy link
Author

MagnusJohansson commented Jul 12, 2023

@kentcb Can the tests be modified to not mock the ByteStream, as per this comment?

dart-lang/http#956

@kentcb
Copy link
Owner

kentcb commented Jul 22, 2023

Resolved by #40 and published

@kentcb kentcb closed this Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants