`scripts/prebuild.sh` fails and pubspec.yaml dependencies not resolving.
Description
I'm trying to build this project on NixOS. scripts/prebuild.sh is failing.
Expected result
scripts/prebuild.sh should do its work and exit with status 0.
Current behavior
scripts/prebuild.sh fails with status 1
Preconditions (optional)
> flutter --version
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision nixpkgs000 () • 1970-01-01 00:00:00
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3
Reproduction Steps
- Run NixOS
- remove
*.lockfrom.gitignore - Add the following to
flake.nixdefinition (required due to #322871 in nixpkgs):
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
inputs:
inputs.flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import inputs.nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
};
devShells.default = pkgs.mkShell
{
buildInputs = with pkgs;
[
flutter
];
shellHook = ''
export CHROME_EXECUTABLE=/run/current-system/sw/bin/google-chrome-stable
export PATH="$PATH":"$HOME/.pub-cache/bin"
export FLUTTER_ROOT="${pkgs.flutter}"
fish
'';
};
in
{
inherit devShells;
}
);
}
- run
nix --experimental-features 'nix-command flakes' developto enter a dev shell. - Within the shell, run
bash scripts/prebuild.sh
Acceptance criteria
As a developer, on latest Flutter stable, I am able to run scripts/prebuild.sh without errors.
Context
NixOS, but should be reproducible with a Nix install on any Nix-supported OS.
Additional information
hi @EliRibble ,
Upgrading mockito still not make it work? An PR to fix it is welcome.
Thanks you.
Yeah, after bumping all of the mokito entries from 5.4.2 to ^5.4.4 gets farther, but fails with:
Resolving dependencies... (4.5s)
Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.
Because tmail_ui_user depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required.
So, because tmail_ui_user depends on intl 0.18.1, version solving failed.
which is in the
+ cd ../server_settings
+ flutter pub get
An PR to fix it is welcome.
I'm happy to do that, but I think I may run up against whatever it is that's causing this project to hold tmail_ui_user on intl 0.18.1