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

Upgrade to Dart 3 to compatibility with http ^1.0.0 #414

Merged
merged 27 commits into from
Jul 3, 2023

Conversation

Carapacik
Copy link
Contributor

@Carapacik Carapacik commented May 24, 2023

Update dependencies
Update example to latest version
Fix analysis and format issues

Also update cached_network_image PR

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated
  • Rebased onto current develop

@Carapacik
Copy link
Contributor Author

#413

@Sreeharikr
Copy link

Yeah.... I can't upgrade http package and packages depending on http.

Copy link
Collaborator

@renefloor renefloor left a comment

Choose a reason for hiding this comment

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

Hi thanks for the nice PR. Also thanks for the cleanup throughout the code. However, this makes it a bit harder for me to spot the really important differences.

As far as I can see http 1.0.0 has no breaking changes, besides using new Dart 3.0 language features. So I think we can allow for http 1.0.0 without dropping support for 0.13.0 right? That makes it easier for others to upgrade in their own time.

I see you also dropped support for rxdart 0.26.0. Is there any reason for it? That version already is made with null safety looking at pub.dev. With a package it's always important to support as big of a range of versions as possible.

flutter_cache_manager/pubspec.yaml Outdated Show resolved Hide resolved
@Carapacik
Copy link
Contributor Author

I agree with rxdart, and upgraded the rest to support null safety.

@Carapacik
Copy link
Contributor Author

Carapacik commented Jun 19, 2023

Also check my PR for cached_network_image please

flutter_cache_manager/example/pubspec.yaml Outdated Show resolved Hide resolved
flutter_cache_manager/pubspec.yaml Outdated Show resolved Hide resolved
flutter_cache_manager/CHANGELOG.md Outdated Show resolved Hide resolved
flutter_cache_manager/pubspec.yaml Outdated Show resolved Hide resolved
flutter_cache_manager/pubspec.yaml Outdated Show resolved Hide resolved
flutter_cache_manager/pubspec.yaml Outdated Show resolved Hide resolved
flutter_cache_manager/pubspec.yaml Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage: 83.33% and project coverage change: -0.22 ⚠️

Comparison is base (28e081e) 75.39% compared to head (06dbb27) 75.18%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #414      +/-   ##
===========================================
- Coverage    75.39%   75.18%   -0.22%     
===========================================
  Files           22       22              
  Lines          691      685       -6     
===========================================
- Hits           521      515       -6     
  Misses         170      170              
Impacted Files Coverage Δ
.../lib/src/cache_managers/default_cache_manager.dart 0.00% <ø> (ø)
...utter_cache_manager/lib/src/config/_config_io.dart 12.50% <ø> (ø)
flutter_cache_manager/lib/src/logger.dart 75.00% <ø> (-5.00%) ⬇️
...cache_info_repositories/cache_object_provider.dart 0.00% <0.00%> (ø)
...torage/cache_info_repositories/helper_methods.dart 100.00% <ø> (ø)
...info_repositories/non_storing_object_provider.dart 0.00% <0.00%> (ø)
...er/lib/src/storage/file_system/file_system_io.dart 0.00% <0.00%> (ø)
..._info_repositories/json_cache_info_repository.dart 90.62% <94.44%> (ø)
flutter_cache_manager/lib/src/cache_manager.dart 88.15% <100.00%> (-0.16%) ⬇️
...er/lib/src/cache_managers/image_cache_manager.dart 100.00% <100.00%> (ø)
... and 7 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Carapacik
Copy link
Contributor Author

Analyzer and format issues fixed

@Carapacik Carapacik requested a review from renefloor June 20, 2023 14:06
@ryanheise
Copy link

Hi thanks for the nice PR. Also thanks for the cleanup throughout the code. However, this makes it a bit harder for me to spot the really important differences.

It might be helpful to update CONTRIBUTING.md with guidelines to keep the diffs minimal in a pull request to aid the review process, and to avoid addressing multiple unrelated issues in a single pull request. I can see how reviewing 110 changed files for a PR that upgrades a dependency could be somewhat uncomfortable.

@Carapacik
Copy link
Contributor Author

@renefloor, Is it worth updating build_runner min version to 2.0.0? Since previous versions support Dart < 2.12. build_runner is still only needed to generate for mockito.

@renefloor
Copy link
Collaborator

I'm testing the code now on the oldest and newest Flutter versions, hope you don't mind pushing some fixes directly?

@Carapacik
Copy link
Contributor Author

I'm testing the code now on the oldest and newest Flutter versions, hope you don't mind pushing some fixes directly?

No problem

@Carapacik
Copy link
Contributor Author

@renefloor Do you mind if I make some changes to delete unused rows in example to pass analysis?

@renefloor
Copy link
Collaborator

I'm currently also still making some changes, so maybe better to wait and not create (many) merge conflicts.

It's too hard to keep the current minimum. I would have to allow flutter_lints 1.0.4, but that means that various developers can have different set of warnings. Setting the minimum to Dart 2.17.0 and Flutter 3.0.0, which are both over 1 year old.

@Carapacik
Copy link
Contributor Author

I'm currently also still making some changes, so maybe better to wait and not create (many) merge conflicts.

It's too hard to keep the current minimum. I would have to allow flutter_lints 1.0.4, but that means that various developers can have different set of warnings. Setting the minimum to Dart 2.17.0 and Flutter 3.0.0, which are both over 1 year old.

flutter_lines and other dev_dependencies dependencies do not affect the operation of package versions. That is, if dev_dependencies has the minimum version 2.17, and dependencies 2.12, then the package will have version 2.12.

@Carapacik
Copy link
Contributor Author

If anything, I would recommend putting a minimum 2.19 version of dart for the package. Since it is the last one that supports no-sound-null-safety.

@renefloor
Copy link
Collaborator

That is, if dev_dependencies has the minimum version 2.17, and dependencies 2.12, then the package will have version 2.12.

I expect so as well, but it did complain if I try to add it as a dependency in another clean project.

@renefloor
Copy link
Collaborator

renefloor commented Jul 3, 2023

@Carapacik it looks good to me now, you agree?
I'm ignoring the code coverage now.

@Carapacik
Copy link
Contributor Author

Now yes

@renefloor
Copy link
Collaborator

I wonder if anybody will ever run this as real compiled app 😆

@Carapacik
Copy link
Contributor Author

of course it will compile

@renefloor
Copy link
Collaborator

I meant for this change in the example:

      if (kDebugMode) {
        print(error);
      }

@Carapacik
Copy link
Contributor Author

@renefloor cached_network_image next?

@renefloor
Copy link
Collaborator

cached_network_image next?

I now have to start really working, but probably can look at it tomorrow.

I think it should work fine already though.
flutter_cache_manager: ^3.3.0 should automatically resolve to 3.3.1 and I don't see any other conflicting dependencies. Only the sdk should be <4.0.0, but I believe that is basically ignored for Dart 3.0.0?

@Carapacik
Copy link
Contributor Author

Carapacik commented Jul 3, 2023

cached_network_image next?

I now have to start really working, but probably can look at it tomorrow.

I think it should work fine already though. flutter_cache_manager: ^3.3.0 should automatically resolve to 3.3.1 and I don't see any other conflicting dependencies. Only the sdk should be <4.0.0, but I believe that is basically ignored for Dart 3.0.0?

There is still file ^7.0.0 used and there is an error with types somewhere.
Also in that PR, the example has been updated.

@renefloor renefloor merged commit 7fbc493 into Baseflow:develop Jul 3, 2023
10 of 11 checks passed
@renefloor
Copy link
Collaborator

@Carapacik published flutter_cache_manager: https://pub.dev/packages/flutter_cache_manager/versions/3.3.1

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

6 participants