slang-i18n / slang

Type-safe i18n for Dart and Flutter
https://pub.dev/packages/slang
MIT License
421 stars 36 forks source link

Use source_gen #163

Open ncuillery opened 9 months ago

ncuillery commented 9 months ago

In the Dart package ecosystem, most of the packages are using source_gen which formats the output code. This process has 2 main benefits:

I have started using slang and everytime I run dart run slang, I have to run dart format . and commit the changes otherwise my CI build is broken.

There is no way to exclude file in Dart formatter (yet) https://github.com/dart-lang/dart_style/issues/864 so having generated code properly formatted like code gen packages do would be great.

To repro:

Tienisto commented 9 months ago

A temporary workaround is to remove the generated file inside the CI before running dart format .. This essentially ignores the file as it doesn't exist anymore.

Integrating source_gen requires a lot of effort so it is unlikely in the near future.

ngoc-quoc-huynh commented 4 months ago

Having the same problem. Would wish this feature to be implemented.