-
Notifications
You must be signed in to change notification settings - Fork 36
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: new optional loadFonts parameter #101
base: main
Are you sure you want to change the base?
Conversation
Maybe an other solution can be to check inside loadFonts if the fonts already exist. I didn't know if it's possible. |
dcf9556
to
8040f8a
Compare
I find it a bit cumbersome to have to specify For example: flutter test --dart-define=LOAD_GOLDEN_FONTS=false The implementation in const _loadFontsDefault = bool.fromEnvironment('LOAD_GOLDEN_FONTS', defaultValue: true);
// ...
Future<void> goldenTest({
// ...
bool? loadFonts,
}) async {
// ...
goldenTestAdapter.setUp(
() => _setUpGoldenTests(mustLoadFonts: loadFonts ?? _loadFontsDefault),
);
} |
I think we can find a better solution. I create this PR as a quick fix because i (and my team) couldn't use this package. |
True, maybe adding a property to |
This pull request has been automatically closed because it has not been updated in the last 3 months. 😪 If you still need this change, please reopen it and update it within the next 3 months. Thanks for helping keep our house in order! |
Don't close please |
Should I add the parameter in this config ? |
Sorry about that! We have to make some time to dig into this |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 562 563 +1
=========================================
+ Hits 562 563 +1 ☔ View full report in Codecov by Sentry. |
This pull request has been automatically closed because it has not been updated in the last month. 😪 If you still need this change, you can reopen it. Thanks for helping keep our house in order! |
commenting for visibility |
What I'm gathering from this is, This doesn't seem like something users should handle, but instead something that Alchemist needs to keep into account by default. I don't see a use-case for a feature where users can toggle @samandmoore @btrautmann @Kirpal @EArminjon Can any of you confirm this thinking? |
That is exactly it. Thank you! |
I agree with the thinking here and agree with @pedromassango that this makes sense once per "suite run". This actually feels similar in terms of granularity to what I mention here, where we're wanting to detect the architecture once and then resolve the golden paths based on that. I mentioned some sort of "global caching mechanism" that may make sense for this use case as well, so maybe in whatever issue we tackle first we could be sure to support additional use cases (if it makes sense to do so). |
Description
fix memory issue along multiple call to loadFonts.
#76
As a developer, I just need to put
loadFonts: false
and call the following code before my multiple goldenTest().This fix also increase test speed, it's insane.
Type of Change
New optional parameters