Skip to content

deps: Upgrade all; fix build_runner #137

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

Merged
merged 5 commits into from
May 31, 2023
Merged

deps: Upgrade all; fix build_runner #137

merged 5 commits into from
May 31, 2023

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented May 30, 2023

Commit messages:


lint: Update database.g.dart to suppress unnecessary_cast too

This happens automatically if you rerun build_runner. Seems like
its omission was basically a mismerge between 901a99e, when it
was merged early from #84:
#84 (comment)
and 780b092 / #22, which added this file.

Chalk it up as another occasion where #60 would have helped keep
things clean.


deps: Upgrade drift, drift_dev, sqlparser

The upgrade to drift_dev 2.8.x seems to be required in order to
work with the upgrade to analyzer 5.12.0 that we took in 861a929.
The others are in turn required for that.

This makes another occasion where having CI, #60, would have helped
keep things clean for us.


deps: Upgrade watcher

With a recent Dart SDK from Flutter main, this is required in
order for build_runner to work. Otherwise it gives an error
like (reformatted):

Failed to build build_runner:build_runner:
../../.pub-cache/hosted/pub.dev/watcher-1.0.2/lib/src/constructable_file_system_event.dart:7:57:
  Error: The class 'FileSystemEvent' can't be extended, implemented,
  or mixed in outside of its library because it's a sealed class.
abstract class _ConstructableFileSystemEvent implements FileSystemEvent {

deps: Upgrade Flutter to latest main, 3.11.0-16.0.pre.11


deps: Upgrade packages within constraints (flutter pub upgrade)

There are currently no upgrades that --major-versions would add
beyond these.

@chrisbobbe
Copy link
Collaborator

Hmm. After checking out this branch (then rebasing atop current main, which has f757587), I ran flutter pub get:

$ flutter pub get
Resolving dependencies... 
The current Dart SDK version is 3.1.0-136.0.dev.

Because zulip requires SDK version >=3.1.0-155.0.dev <4.0.0, version solving failed.

Then flutter upgrade:

$ flutter upgrade
Upgrading Flutter to 3.11.0-16.0.pre.33 from 3.11.0-12.0.pre.15 in
/Users/chrisbobbe/.local/lib/flutter...

[…etc., success]

Then flutter pub get:

$ flutter pub get
Resolving dependencies... (1.8s)
  file 6.1.4 (7.0.0 available)
  file_picker 5.3.1 (5.3.2 available)
  http 0.13.6 (1.0.0 available)
  image_picker_android 0.8.6+16 (0.8.6+17 available)
> matcher 0.12.16 (was 0.12.15)
> test 1.24.3 (was 1.24.2)
> test_api 0.6.0 (was 0.5.2)
> test_core 0.5.3 (was 0.5.2)
  win32 4.1.4 (5.0.3 available)
  win32_registry 1.1.0 (1.1.1 available)
Changed 4 dependencies!

Then (probably relevant to that last command) there were some changes to pubspec.lock:

diff --git pubspec.lock pubspec.lock
index a4568c8fa..7aa872539 100644
--- pubspec.lock
+++ pubspec.lock
@@ -500,10 +500,10 @@ packages:
     dependency: transitive
     description:
       name: matcher
-      sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+      sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
       url: "https://pub.dev"
     source: hosted
-    version: "0.12.15"
+    version: "0.12.16"
   material_color_utilities:
     dependency: transitive
     description:
@@ -817,26 +817,26 @@ packages:
     dependency: "direct dev"
     description:
       name: test
-      sha256: "4f92f103ef63b1bbac6f4bd1930624fca81b2574464482512c4f0896319be575"
+      sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46"
       url: "https://pub.dev"
     source: hosted
-    version: "1.24.2"
+    version: "1.24.3"
   test_api:
     dependency: transitive
     description:
       name: test_api
-      sha256: daadc9baabec998b062c9091525aa95786508b1c48e9c30f1f891b8bf6ff2e64
+      sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
       url: "https://pub.dev"
     source: hosted
-    version: "0.5.2"
+    version: "0.6.0"
   test_core:
     dependency: transitive
     description:
       name: test_core
-      sha256: "3642b184882f79e76ca57a9230fb971e494c3c1fd09c21ae3083ce891bcc0aa1"
+      sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e"
       url: "https://pub.dev"
     source: hosted
-    version: "0.5.2"
+    version: "0.5.3"
   timing:
     dependency: transitive
     description:

I checked, and at least one of those package versions was already out (link) when you wrote this branch, so it seems like that new version could have been taken then. I wonder why it wasn't; any ideas?

@gnprice
Copy link
Member Author

gnprice commented May 31, 2023

I checked, and at least one of those package versions was already out (link) when you wrote this branch, so it seems like that new version could have been taken then. I wonder why it wasn't; any ideas?

If you try the same Flutter version that's named in this branch, I'd expect you get no updates beyond what's in the branch.

It can take a bit for updates to other packages to roll into Flutter's dependencies, so I'd guess that that just hadn't happened yet as of the version I upgraded to (which was the latest Flutter main at that time.)

@chrisbobbe
Copy link
Collaborator

If you try the same Flutter version that's named in this branch, I'd expect you get no updates beyond what's in the branch.

Yeah. In my Flutter clone, if I set main to flutter/flutter@1dc26f80f, then in the project repo flutter --version gives

$ flutter --version
Flutter 3.11.0-16.0.pre.11 • channel main •
https://github.com/flutter/flutter.git
Framework • revision 1dc26f80f0 (27 hours ago) • 2023-05-30 15:37:12 -0400
Engine • revision a6d3124ced
Tools • Dart 3.1.0 (build 3.1.0-155.0.dev) • DevTools 2.23.1

and flutter pub get doesn't make any changes.

It can take a bit for updates to other packages to roll into Flutter's dependencies, so I'd guess that that just hadn't happened yet as of the version I upgraded to (which was the latest Flutter main at that time.)

I think this happens a few commits after flutter/flutter@1dc26f80f; in particular, I'm pretty sure it happens in flutter/flutter@0763d61f5.

@chrisbobbe
Copy link
Collaborator

chrisbobbe commented May 31, 2023

LGTM, thanks! Please merge at will.

(Then updating past flutter/flutter@0763d61f5 or whatever—probably just to current main—can be a followup, or at least something that we'll naturally end up doing in the future.)

gnprice added 5 commits May 31, 2023 15:56
This happens automatically if you rerun build_runner.  Seems like
its omission was basically a mismerge between 901a99e, when it
was merged early from zulip#84:
  zulip#84 (comment)
and 780b092 / zulip#22, which added this file.

Chalk it up as another occasion where zulip#60 would have helped keep
things clean.
The upgrade to drift_dev 2.8.x seems to be required in order to
work with the upgrade to analyzer 5.12.0 that we took in 861a929.
The others are in turn required for that.

This makes another occasion where having CI, zulip#60, would have helped
keep things clean for us.
With a recent Dart SDK from Flutter main, this is required in
order for build_runner to work.  Otherwise it gives an error
like (reformatted):

    Failed to build build_runner:build_runner:
    ../../.pub-cache/hosted/pub.dev/watcher-1.0.2/lib/src/constructable_file_system_event.dart:7:57:
      Error: The class 'FileSystemEvent' can't be extended, implemented,
      or mixed in outside of its library because it's a sealed class.
    abstract class _ConstructableFileSystemEvent implements FileSystemEvent {
There are currently no upgrades that `--major-versions` would add
beyond these.
@gnprice gnprice merged commit f28dd0b into zulip:main May 31, 2023
@gnprice gnprice deleted the pr-deps branch May 31, 2023 23:04
gnprice added a commit to gnprice/zulip-flutter that referenced this pull request Jun 5, 2023
Otherwise we get the following warning when running build_runner
(wrapped here for readability):

    [WARNING] json_serializable on lib/api/route/users.dart:
    The version constraint "^4.8.0" on json_annotation
    allows versions before 4.8.1 which is not allowed.

I believe that warning was introduced with the json_serializable
upgrade from 6.6.2 to 6.7.0 in f28dd0b / zulip#137.
chrisbobbe pushed a commit that referenced this pull request Jun 7, 2023
Otherwise we get the following warning when running build_runner
(wrapped here for readability):

    [WARNING] json_serializable on lib/api/route/users.dart:
    The version constraint "^4.8.0" on json_annotation
    allows versions before 4.8.1 which is not allowed.

I believe that warning was introduced with the json_serializable
upgrade from 6.6.2 to 6.7.0 in f28dd0b / #137.
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.

2 participants