flutter: 3.3.8 -> 3.7.9#224090
flutter: 3.3.8 -> 3.7.9#224090algorithmiker wants to merge 3 commits intoNixOS:masterfrom algorithmiker:flutter-3.7.7
Conversation
|
@FlafyDev can you here state publicly that you are ok with those changes being merged? |
|
@gilice, thank you for the work! Unfortunately, I haven't had a lot of free time lately and I'm glad someone took on this problem :) Should I close my PR now? |
|
Let's wait until we merge this, I guess. |
Yes, I have no problem for these changes to be merged to Nixpkgs. Also no, I haven't used any of the changes from @AtaraxiaSjel's PR. |
|
The patches are failing to apply |
|
Yes, I am aware. working on it, will make this WIP in the meantime |
|
broken by flutter/flutter#121802 lmao edit: fixed, that was pretty fast |
|
This finally builds !!! :) |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/2022 |
|
I receive an error while trying to build for Android. ErrorI have added the above repository to the flake, locked it to the latest commit flutterNixpkgs = {
type = "github";
owner = "gilice";
repo = "nixpkgs";
rev = "dd242357fde311d4695d265baebd232a7ad7cf1a";
};And I've added |
|
also @FlafyDev flutter2 fails because it's dart doesn't have precache, we need separate builders. |
Why package flutter 2? |
|
@FlafyDev |
Latest version of |
|
OK, going to bump that then. |
|
I can reproduce the issues @MGlolenstine is having, tho. |
|
After I fix the arm64 hashes, this should be complete. In the future, the most safe way to proceed seems to be to create a dartPackages. |
|
We got the arm64 hashes thanks to @aktaboot. I've been dogfooding this for the last few days without issues. |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/2041 |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
Result of 2 packages failed to build:
3 packages built:
Failures are due to hash mismatch. |
This updates flutter and will also probably fix the dependency- armageddon we are seeing with #211606. This is based on @FlafyDev's work, who said it's okay for me to upstream the changes. Flutter 3.7 was attempted earlier by @AtaraxiaSjel, whom we thank greatly. This PR therefore Closes #215754 Closes #215537 Co-authored-by: FlafyDev <44374434+flafydev@users.noreply.github.com> Co-authored-by: AtaraxiaSjel<5314145+ataraxiasjel@users.noreply.github.com>
|
@NickCao can you please rerun nixpkgs-review? |
|
Result of 1 package failed to build:
4 packages built:
There's still some issue with the hashes. |
|
aarch64 hash for yubioath-flutter: |
|
@NickCao can we do another go? the packages build individually fine now, but I cannot review because it OOMs |
|
@ofborg build firmware-updater yubioath-flutter hover |
|
Failed once again due to hash mismatch They might still be non reproducible. |
|
Would you be able to split this up into smaller commits? There is a lot being changed here (preload support, wrapper changes, added libraries, etc.). |
|
Regarding the changes to wrapping, the FHS, and libraries, please consider my alternative approach over at #201027. This PR makes use of
As for the differing wrapping methods, I have a function that builds a derivation composing a single modified
My PR also makes it very clear what is required only for Linux desktop support, and allows the feature to be disabled to reduce closure size. I have last tested my PR with Flutter 3.7.3, and it works nicely. I am now attempting to add the new preloading functionality for support with 3.7.9+. |
|
@hacker1024 I am fine with handing this PR over to you. I have a lot of things going on right now and not really enough time to find out why the deps of yubioath are changing. |
|
If you confirm that you are taking over this, I'll move on to doing reproducibility work instead (see #211606 ) |
|
Sure. I'm looking forward to fixing reproducibility, eager to see what you come up with on that front. I'll implement 3.7.10 on my branch in the next day or two. |
|
Hey If I haven't missed anything, this PR updates Flutter as the title says. But it also updates the way Flutter gets its artifacts. Usually, Flutter(in nixpkgs and in general) downloads all the artifacts at runtime when you first run This PR, on the other hand, downloads and packages these artifacts with the derivation and disables Flutter's ability to modify/update them. I think this approach is preferable to downloading the artifacts at runtime for the following reasons:
You are referencing two different things here. There are libraries Flutter needs to be available on the system at runtime for building projects to different platforms. For example, you'll need cmake, ninja, gtk, etc... for building Flutter projects to Linux. Then there are artifacts, which are files Flutter always needs at runtime and are usually bundled with it when getting it (Nixpkgs is the exception, as I've explained above). This PR makes it so artifacts are bundled with Flutter at its unwrapped derivation (IMO this is necessary. See my reasons above) The artifacts are what Flutter attempts to download/update at runtime. And the former(libraries, like gtk that Flutter needs to build apps to Linux) are the ones not guaranteed to be available at runtime.
I don't know how more convenient it will be than just using prebuilts, but having the option to build yourself or using prebuilts from nixpkgs rather than Google will be nice, I guess. I do think the suggestion in #201027 is a good idea. That is, having different wrappers applied depending on what you'll use Flutter for. For example, currently in nixpkgs unwrapped Flutter is wrapped with many dependencies for building Flutter apps for Android, which is not ideal. Additionally, after this PR Flutter will no longer require FHS for building to Linux. But FHS will still be needed when building for Android, so having that managed depending on the needs would be nice. That being said, and if I'm not wrong, this PR isn't focused on how Flutter is wrapped, so I don't think it should interfere with #201027. Perhaps there should be some changes to this PR to minimize the difference in the wrapping code, though.. EDIT: To clarify, there are artifacts that are used only to bulid to android or linux. But there aren't artifacts that are optional, though. If you are on Linux, Flutter will automatically download artifacts for building to android if it can't find them. I think flutter tried to download the artifacts based on the operating system. If used on linux, Flutter can only build apps for android, web and linux, and will thus download in advance only the artifacts for building to linux/android/web, and not for IOS for example. And it will complain(at least without any patches) if it can't get them. |
|
Thanks for that breakdown, it's very clear. I think the easiest thing to do at this point is to incorporate the artifact and patching changes into my branch, and then update the wrappers accordingly. I've already done a lot of the modularisation required to pull out Android and the FHS components. As for Android, I've been meaning to look into it, but figured that was out of scope for the time being. I think the current Android solution is inappropriate - to my understanding, most of the added libraries are there for the functioning of the Android SDK, but this is beyond the scope of Flutter. It makes more sense to have another derivation to patch or wrap the SDK, as is done in android-nixpkgs. |
This updates flutter and will also probably fix the dependency- armageddon we are seeing with #211606.
This is mostly @FlafyDev's work, who said it's okay for me to upstream the changes.
Flutter 3.7 was attempted earlier by @AlexandraSjel, whom we thank greatly.
This PR therefore
Closes #215754
Closes #215537
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)