You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using easy_localization:generate in my company's Flutter app.
Recently, I added some code to our GitHub workflow to check if developers have run the easy_localization:generate command after adding or editing localization strings.
The workflow runs:
dart run easy_localization:generate -S assets/translations
dart run easy_localization:generate -S assets/translations -f keys -o locale_keys.g.dart
After that, the workflow fails if there are any code changes.
The problem is that codegen_loader.g.dart differs from the base code when the workflow is executed. The reason for this failure is that the order of the mapLocales variable in codegen_loader.g.dart is inconsistent.
I believe this happens because, when the asset file list is retrieved from the directory, the order of files is not guaranteed. Therefore, I suggest sorting the file list based on the file names to ensure consistency
The text was updated successfully, but these errors were encountered:
I'm using easy_localization:generate in my company's Flutter app.
Recently, I added some code to our GitHub workflow to check if developers have run the easy_localization:generate command after adding or editing localization strings.
The workflow runs:
After that, the workflow fails if there are any code changes.
The problem is that codegen_loader.g.dart differs from the base code when the workflow is executed. The reason for this failure is that the order of the mapLocales variable in codegen_loader.g.dart is inconsistent.
For example:
Base code:
{"en": en, "ko": ko}
GitHub workflow result:
{"ko": ko, "en": en}
I believe this happens because, when the asset file list is retrieved from the directory, the order of files is not guaranteed. Therefore, I suggest sorting the file list based on the file names to ensure consistency
The text was updated successfully, but these errors were encountered: