-
Notifications
You must be signed in to change notification settings - Fork 300
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
feat: add preamble for dart generated files #1949
Conversation
Signed-off-by: Krysl <krysl@qq.com>
Hi! Thanks for opening this pull request! 😄 |
I wrote it too hastily and added redundant parameters. I will clean them up. |
Signed-off-by: Krysl <krysl@qq.com>
Good job! To make CI pass (and if not want to run the too slow precommit), try |
Signed-off-by: Krysl <krysl@qq.com>
Signed-off-by: Krysl <krysl@qq.com>
No worries about the failed Web test - looks like flaky |
To make a test, just add premable config in https://github.com/fzyzcjy/flutter_rust_bridge/blob/master/frb_example/pure_dart/flutter_rust_bridge.yaml, and then run
and commit the changed code |
Sorry for late. the frb_internal test alwayse has some strange errors, and makes me a little impatient.
I've already tried adding a line of configuration there before, but the test didn't report any errors, and obviously there wasn't any verification of the generated code. Maybe I'm wrong? |
Adding one line of preamble affects hundreds of generated files in pure_dart and pure_dart_pde... |
Anyway, then let me do it (hopefully within a day), no worries! |
Signed-off-by: Krysl <krysl@qq.com>
Sorry, I'm too slow. |
Well, no need to be in there IMHO - just add premable config in master/frb_example/pure_dart/flutter_rust_bridge.yaml.
I am not sure what happened, but the generated code will only contain a few lines of change (the new header). Maybe it is because of failure of text formatting etc? |
Well, it's your code base. If you think it's acceptable, then I'll do as you say.
No text formatting issues. (It's just that I don't like that such a simple patch affects so many files.) |
Oh I see - then your simple test looks totally reasonable and elegant! Sorry for the misundestanding, I originally thought you meant some bugs in scripts to run codegen like formatting issues. |
Signed-off-by: Krysl <krysl@qq.com>
Hi! Congrats on merging your first pull request! 🎉 |
@all-contributors please add @Krysl for code |
I've put up a pull request to add @Krysl! 🎉 |
Changes
Fixes #1948
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.