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

Release a null-safe pre-release of bloc_test #2063

Closed
felix-barz-brickmakers opened this issue Jan 7, 2021 · 4 comments · Fixed by #1733
Closed

Release a null-safe pre-release of bloc_test #2063

felix-barz-brickmakers opened this issue Jan 7, 2021 · 4 comments · Fixed by #1733
Assignees
Labels
enhancement New feature or request pkg:bloc_test This issue is related to the bloc_test package

Comments

@felix-barz-brickmakers
Copy link

bloc and flutter_bloc have already been released with a nullsafe version as prerelease. Please create such a prerelease for bloc_test as well, so we can actually upgrade flutter_bloc or bloc and try out nullsafety.

@felangel
Copy link
Owner

felangel commented Jan 8, 2021

Hi @felix-barz-brickmakers 👋
Thanks for opening an issue!

I'm more or less ready to do so but my hesitation has been due to the breaking changes in mockito's API due to null safety (which bloc_test relies on). I have been experimenting with a different approach to mocks which would avoid relying on manual overrides and code generation that would allow bloc_test to function as it did before but have been hesitant to push this approach because it could potentially create confusion.

I would love to hear everyone's feedback before proceeding either way, thanks! 🙏

@felangel felangel self-assigned this Jan 8, 2021
@felangel felangel added discussion Open discussion for a specific topic feedback wanted Looking for feedback from the community question Further information is requested labels Jan 8, 2021
@felix-barz-brickmakers
Copy link
Author

Both variants have valid points. I might even prefer the second approach, as it seems that the mockito guys haven't really found a nice solution for the core problem yet. I have also hade quite some problems with the generated mocks. But one idea for mocktail: Instead of passing a string to the calls method, use symbols instead: when(cat).calls(#meow) - it looks cleaner and makes it explicit, that method names are required.

@felangel
Copy link
Owner

felangel commented Jan 9, 2021

@felix-barz-brickmakers I took your suggestion and refactored mocktail to use Symbol (it was implemented like that originally anyway 😅) and you can track the progress at #2067 👍

@felangel felangel linked a pull request Jan 13, 2021 that will close this issue
17 tasks
@felangel
Copy link
Owner

v8.0.0-nullsafety.0 is now available 🎉

@felangel felangel added pkg:bloc_test This issue is related to the bloc_test package enhancement New feature or request and removed discussion Open discussion for a specific topic feedback wanted Looking for feedback from the community question Further information is requested labels Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:bloc_test This issue is related to the bloc_test package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants