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

scripts/prebuild.sh fails and pubspec.yaml dependencies not resolving. #3128

Open
EliRibble opened this issue Aug 30, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@EliRibble
Copy link
Contributor

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

  1. Run NixOS
  2. remove *.lock from .gitignore
  3. Add the following to flake.nix definition (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;

      }
    );


}
  1. run nix --experimental-features 'nix-command flakes' develop to enter a dev shell.
  2. 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

@hoangdat
Copy link
Member

hi @EliRibble ,

Upgrading mockito still not make it work? An PR to fix it is welcome.

Thanks you.

@EliRibble
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants