rrousselGit / riverpod

A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
https://riverpod.dev
MIT License
6.17k stars 943 forks source link

[Bug] About dependencies #32

Closed shinriyo closed 4 years ago

shinriyo commented 4 years ago

Describe the bug

it is happened.

Running "flutter pub upgrade" in my_app...                      

Because hooks_riverpod >=0.1.0 depends on flutter_hooks ^0.10.0 and my_app depends on flutter_hooks ^0.11.0, hooks_riverpod >=0.1.0 is forbidden.
So, because my_app depends on hooks_riverpod ^0.3.0, version solving failed.
pub upgrade failed (1; So, because my_app depends on hooks_riverpod ^0.3.0, version solving failed.)

To Reproduce

Modify pubspec.yaml below and excute flutter pub upgrade.

environment:
  sdk: ">=2.7.0 <3.0.0"
  flutter: ">= 1.17.0"

dependencies:
  flutter:
    sdk: flutter

  flutter_hooks: ^0.11.0
  hooks_riverpod: ^0.3.0

<Please add a small sample to that can be executed to reproduce the problem. As a general rule, 100 lines is the maximum>

it is about yaml. So, no code.

Expected behavior

downgrade flutter_hooks works, but it opponents for document.

  # flutter_hooks: ^0.11.0
  flutter_hooks: ^0.10.0
  hooks_riverpod: ^0.3.0
shinriyo commented 4 years ago

It was not helpful.

flutter update-packages
rm pubspec.lock 
flutter clean
rrousselGit commented 4 years ago

What if you force hooks_riverpod's version to 0.3.1?

shinriyo commented 4 years ago

@rrousselGit hello. Thank you for replying. Do you mean to put the original file directory without writing hooks_riverpod: ^0.3.1 in the pubspec.yaml?

rrousselGit commented 4 years ago

What I mean is, the version of Riverpod that supports hooks 0.11.0 is the version 0.3.1

But your pubspec specifies 0.3.0

shinriyo commented 4 years ago

59C3D5CF-2CBE-433B-AB78-21190892A280 Yes, it is. Because, I just referred to the official document. Is it typo? If the document is version controlled by github, I can send pull-request.

rrousselGit commented 4 years ago

Indeed, I've changed fix the document

shinriyo commented 4 years ago

7A94B0AF-E7B2-468F-8491-B4D4FDC40232

Wow! How quick works isn't it? Thank you. I will close the issue.

shinriyo commented 4 years ago

I'm sorry. However, 0.3.1 has not released yet. https://pub.dev/packages/hooks_riverpod#-installing-tab-

Screen Shot 2020-07-06 at 11 50 09

I reopened the Issued until release.

rrousselGit commented 4 years ago

Oops, done