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

Pub Get fails because of floor_generator's build_runner 1.6.3 dependency #523

Closed
MrCsabaToth opened this issue Mar 25, 2021 · 4 comments · Fixed by #525
Closed

Pub Get fails because of floor_generator's build_runner 1.6.3 dependency #523

MrCsabaToth opened this issue Mar 25, 2021 · 4 comments · Fixed by #525

Comments

@MrCsabaToth
Copy link

MrCsabaToth commented Mar 25, 2021

So, because track_my_indoor_exercise depends on both build_runner ^1.12.2 and floor_generator ^1.0.0, version solving failed.
pub get failed (1; So, because track_my_indoor_exercise depends on both build_runner ^1.12.2 and floor_generator ^1.0.0, version solving failed.)

I don't know where's the 1.6.3 coming from. As far as I see in the source repo the floor_generator depends on build: ^2.0.0.

Flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 2.1.0-12.2.pre, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.54.3)
[✓] Connected device (2 available)

• No issues found!

My pubspec.yaml:

publish_to: "none"

version: 1.1.21+30

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  assorted_layout_widgets: ^4.0.1
  charts_flutter: ^0.10.0
  convert: ^3.0.0
  datetime_picker_formfield: ^2.0.0
  device_info: ^2.0.0
  expandable: ^5.0.1
  fab_circular_menu: ^1.0.2
  file_picker: ^3.0.0
  floor: ^1.0.0
  flutter_blue:
    git:
      url: https://github.com/MrCsabaToth/flutter_blue.git
      ref: patch-1
  flutter_brand_icons: ^1.1.0
  get: ^4.0.0-nullsafety.2
  http: ^0.13.1
  http_parser: ^4.0.0
  internet_connection_checker: ^0.0.1
  intl: ^0.17.0
  listview_utils:
    git:
      url: https://github.com/WaleedAlrashed/flutter-listutils.git
  loading_overlay: ^0.3.0
  meta: ^1.2.4
  preferences: any
  progress_indicators: ^0.1.5
  rxdart: ^0.26.0
  share_files_and_screenshot_widgets: ^1.0.3
  shared_preferences: ^2.0.5
  spinner_input: ^0.1.2
  sqflite: ^2.0.0+3
  tuple: ^2.0.0
  uni_links2: ^0.6.0+2
  url_launcher: ^6.0.3
  wakelock: ^0.5.0+2
  flutter:
    sdk: flutter

dev_dependencies:
  build_runner: ^1.12.2
  floor_generator: ^1.0.0
  integration_test: ^1.0.2+2
  mockito: ^5.0.3
  mock_data: ^1.2.8
  flutter_test:
    sdk: flutter
  flutter_driver:
    sdk: flutter
@MrCsabaToth
Copy link
Author

I wiped ~/.pub-cache. After that I can see in the ~/.pub-cache/hosted/pub.dartlang.org/.cache/floor_generator-versions.json that it is indeed references 1.6.3 build.

@MrCsabaToth
Copy link
Author

MrCsabaToth commented Mar 25, 2021

OK, I see that 2a76267 is only 4 days old and not released. How could I reference the current git repo version in my pubspec? If I try:

  floor:
    git:
      url: https://github.com/vitusortner/floor.git
      path: floor

That works. However

  floor_generator:
    git:
      url: https://github.com/vitusortner/floor.git
      path: floor_generator

Does not, because Invalid description in the "floor_generator" pubspec on the "floor_annotation" dependency: "../floor_annotation/" is a relative path, but this isn't a local pubspec.

@mqus
Copy link
Collaborator

mqus commented Mar 27, 2021

referencing git commits only works by cloning the repo locally, e.g. with git submodules. Sadly, pub can't handle relative references over git remotes(see dart-lang/pub#2447) and the alternative (using a git url for the floor_annotation dep and similar ones) creates too much hassle when developing floor.

@MrCsabaToth
Copy link
Author

Just a closing note: if someone gets to the point in desperation to wipe the ~/.pub-cache like me, it needs a flutter pub cache repair afterwards to get everything back to a potentially functioning condition. Without flutter pub cache repair only flutter SDK shipped packages could be imported without an error for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants