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

http_mock_adapter 0.5.0 conflicts with flutter_test collection version. #155

Closed
quoc-huynh-cosee opened this issue Aug 18, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@quoc-huynh-cosee
Copy link

Description

I'm receiving this error when I trying to use the new version of http_mock_adapter. This is due that the flutter stable version is still using a lower collection version than 1.18.0.

Because http_mock_adapter >=0.5.0 depends on collection ^1.18.0 and every version of flutter_test from sdk depends on collection 1.17.1, http_mock_adapter >=0.5.0 is incompatible with flutter_test from sdk.
So, because myapp depends on both flutter_test from sdk and http_mock_adapter ^0.5.0, version solving failed.

Steps to reproduce

  1. Create a new project (Flutter stable)
  2. Add flutter_test & http_mock_adapter 0.5.0 to pubspec.yaml.
  3. Run flutter pub get

Expected behavior

The shouldn't be an error.

@quoc-huynh-cosee quoc-huynh-cosee added the bug Something isn't working label Aug 18, 2023
@LukaGiorgadze
Copy link
Member

LukaGiorgadze commented Aug 18, 2023

Hi @quoc-huynh-cosee,
This is a known issue #141
One way to fix it is to not update http-mock-adapter and stick with v0.4.4.

The latest version of Flutter depends on 1.18 collection https://github.com/search?q=repo%3Aflutter%2Fflutter+collection%3A&type=code which should not be a problem.

@quoc-huynh-cosee
Copy link
Author

@LukaGiorgadze I just checked the Flutter repository and the collection 1.18.0 version is only on master. On stable is it currently 1.17.2. See e.g. https://github.com/flutter/flutter/blob/stable/examples/splash/pubspec.yaml.

@LukaGiorgadze
Copy link
Member

@quoc-huynh-cosee yeah, it seems it's still far away from the stable version.
Okay, I'll downgrade to 1.17.2

@quoc-huynh-cosee
Copy link
Author

@LukaGiorgadze Thanks!

@LukaGiorgadze
Copy link
Member

@quoc-huynh-cosee We are preparing 0.6.0 release and collection 1.17.1 will be there.

It's in the main branch 4a16952

@sebastianbuechler
Copy link
Collaborator

@LukaGiorgadze Do you want to do the release? I think #161 won't be applicable before adhering to the commit structure anyway.

@LukaGiorgadze
Copy link
Member

LukaGiorgadze commented Aug 28, 2023

@sebastianbuechler Yeh, agree, I just did not have time to write a new doc and update README according to your PRs 😮‍💨 Hopefully I'll do it tomorrow.

@LukaGiorgadze
Copy link
Member

@quoc-huynh-cosee v0.6.0 version has been released. Hope it fixes your issue.

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

3 participants