fzyzcjy / flutter_convenient_test

Write and debug tests easily, with full action history, time travel, screenshots, rapid re-execution, video records, interactivity, isolation and more

Home Page:pub.dev/packages/convenient_test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test_api version conflict

lthoedt opened this issue · comments

Describe the bug
The manager cannot seem to be build since there are version conflicts with test_api. This issue was around a couple weeks ago and still does not seem to be fixed.

To Reproduce
Steps to reproduce the behavior:
Build manager.

Expected behavior
Builds

Command output:

[packages\convenient_test_manager] flutter pub get
Resolving dependencies...
Note: test_api is pinned to version 0.6.0 by flutter_test from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because convenient_test_manager depends on flutter_test from sdk which depends on test_api 0.6.0, test_api 0.6.0 is required.
So, because convenient_test_manager depends on test_api ^0.5.1, version solving failed.
exit code 1

My pubspec.yaml, straight from this repo.

name: convenient_test_manager
description: Write and debug tests easily, with full action history, time travel, screenshots, rapid re-execution, video records, interactivity, isolation and more

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.3.0

environment:
  # sdk: ">=2.17.0 <=3.0.0"
  sdk: '^3.0.0'
  flutter: ">=3.0.0"

dependencies:
  collection: ^1.15.0
  convenient_test_common: ^1.0.0
  convenient_test_common_dart: ^1.0.0
  convenient_test_dev: ^1.0.0
  convenient_test_manager_dart: ^1.0.0
  cupertino_icons: ^1.0.2
  dart_vlc: ^0.2.0
  file_picker: ^4.5.1
  fixnum: ^1.0.0
  flutter:
    sdk: flutter
  flutter_mobx:
    git:
      url: https://github.com/fzyzcjy/mobx.dart
      ref: 2e447ae595fa61d5b7a9beec6bee6c1a1155b0f5
      path: flutter_mobx
  flutter_portal: ^1.1.3
  flutter_test:
    sdk: flutter
  get_it: ^7.0.0
  git: ^2.0.0
  grpc: ^3.0.0
  intl: ^0.18.0
  mobx: ^2.0.7
  path: ^1.8.0
  path_provider: ^2.0.9
  protobuf: ^2.0.0
  scrollable_positioned_list: ^0.3.2
  test_api: ^0.5.1
  tuple: ^2.0.0 

dependency_overrides:
  convenient_test:
    path: ../convenient_test
  convenient_test_common:
    path: ../convenient_test_common
  convenient_test_common_dart:
    path: ../convenient_test_common_dart
  convenient_test_dev:
    path: ../convenient_test_dev
  convenient_test_manager_dart:
    path: ../convenient_test_manager_dart
  grpc:
    git:
      url: https://github.com/fzyzcjy/grpc-dart # #3761

dev_dependencies:
  analyzer: ^5.4.0
  build_runner: ^2.3.0
  dart_code_metrics: ^5.5.1
  lint: ">=1.8.2 <3.0.0"
  mobx_codegen: ^2.0.6

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  # assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
  fonts:
    - family: RobotoMono
      fonts:
        - asset: fonts/Roboto_Mono/RobotoMono-Thin.ttf
          weight: 100
        - asset: fonts/Roboto_Mono/RobotoMono-Light.ttf
          weight: 300
        - asset: fonts/Roboto_Mono/RobotoMono-Regular.ttf
          weight: 400
        - asset: fonts/Roboto_Mono/RobotoMono-Medium.ttf
          weight: 500
        - asset: fonts/Roboto_Mono/RobotoMono-Bold.ttf
          weight: 700

My flutter:

flutter --version
Flutter 3.13.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision efbf63d9c6 (5 days ago) • 2023-08-15 21:05:06 -0500
Engine • revision 1ac611c64e
Tools • Dart 3.1.0 • DevTools 2.25.0

I am not sure whether this is an issue on my side or the application, since i seem to be the only one reporting this it is probably me. But I feel like i have tried everything.

Oops looks like Flutter 3.13 bumps the test_api.

I am using Flutter in production, thus people says that Flutter version x.x.0 is super unstable and should wait for something like x.x.3 or even x.x.6 (eg 3.13.3 or 3.13.6). Thus I have not upgraded my local Flutter and everything yet.

If you want to build it before it is migrated to 3.13, you can use fvm and switch to 3.10 for this package only, and then it should be buildable. Since the manager is not a dependency of your actual app, switching to 3.10 for manager will not affect anything else IMHO.

Okay, sounds workable. Unfortunately fvm doesnt work. I am probably cursed but it gives some stupid error. Which other people had but none of their fixes work.

fvm
Cannot find file at '..\lib\fvm\bin\fvm.exe' (C:\ProgramData\chocolatey\lib\fvm\lib\fvm\bin\fvm.exe). This usually indicates a missing or moved file.

You probably do not either but this is what i got.

Do you expect the version conflict to be solved somewhere in the near future? If so i'll wait for now; i got enough to do :)

Well... That looks like a fvm bug (or fvm installation error). Maybe you should create an issue at fvm, reporting that you cannot use it?

Do you expect the version conflict to be solved somewhere in the near future? If so i'll wait for now; i got enough to do :)

I will upgrade my project (both non-open-source and open-source) somewhere between x.x.3 and x.x.6 (ie 3.13.3 - 3.13.6). I am not sure whether this is "near" for you though.

Okay, i will reach out to them. Thanks for helping out!

You are welcome!

commented

Fvm doesn't really work good once the application is upgraded to 3.13.x. There is a new intl 0.18.1 which causes a version solving fail.

There is a new intl 0.18.1 which causes a version solving fail.

What about making the version constraint of intl loose, does that work? (since convenient_test does not seem to strictly depend on it)

I am upgrading it, it should work well for 3.13.6 (today or tomorrow)

commented

There is a new intl 0.18.1 which causes a version solving fail.

What about making the version constraint of intl loose, does that work? (since convenient_test does not seem to strictly depend on it)

Not really an option, the new intl package is required. Can you publish the updated version, please.

commented

Thank you for the version! I think the intl issue is fixed.

Like in this issue #347 the following error is raised:

Failed to build iOS app Error (Xcode): ../../../.pub-cache/hosted/pub.dev/convenient_test_dev-1.3.0/lib/src/functions/command.dart:9:8: Error: Error when reading '../../../.pub-cache/hosted/pub.dev/test_api-0.6.0/lib/src/expect/async_matcher.dart': No such file or directory

Hmm, try to use 1.3.1

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.