Closed Tienisto closed 3 months ago
Hi! Thanks for opening this pull request! :smile:
Good job! Some nits
initMock
, or the same function with an extra arg init({..., bool mock})
? (I think both have pros and cons...)./frb_internal precommit-generate
(which takes at least several minutes to run since it runs codegen in debug mode for many folders)Thanks for the quick response!
Actually, I had it like init({..., bool mock})
originally. However, I thought it would be unclear what parameters are used and I didn't like that api
is optional while it is not when mock
is true
.
A separate function would be more type safe in this case.
I am fine with both solutions though.
Edit: I've run ./frb_internal precommit-generate
but it doesn't seem to fix all issues. Do you know what's missing?
You are welcome!
However, I thought it would be unclear what parameters are used and I didn't like that api is optional while it is not when mock is true. A separate function would be more type safe in this case.
Looks pretty reasonable.
I've run ./frb_internal precommit-generate but it doesn't seem to fix all issues. Do you know what's missing?
Looks like need to edit https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_codegen/assets/integration_template/shared (e.g. copy-paste/modify things according to the CI hint) which is the template
Thanks! I am currently not at home so feel free to add it. Otherwise, I will add it tomorrow
@all-contributors please add @Tienisto for code
@fzyzcjy
I've put up a pull request to add @Tienisto! :tada:
Hi! Congrats on merging your first pull request! :tada:
@Tienisto Looks like codecov is unhappy (see below; not sure why codecov does not appear in this PR...). Maybe we can add a few lines in https://github.com/fzyzcjy/flutter_rust_bridge/blob/master/frb_example/pure_dart/test/mockability_test.dart to test this code path.
Changes
Fixes #2247.
Checklist
./frb_internal precommit --mode slow
(orfast
) is run (it internal runs code generator, does auto formatting, etc)../website
folder) are updated.Remark for PR creator
./frb_internal --help
shows utilities for development.