digitalfabrik / entitlementcard

App for 'Digitale Berechtigungskarten', generally benefit card for volunteers or socially vulnerable groups in Germany. App for Android & iOS + Backend + Administration Web Portal – 100% Open Source.
MIT License
36 stars 3 forks source link

Use dart run instead of flutter pub run #1783

Closed michael-markl closed 1 week ago

michael-markl commented 1 week ago

Short description

flutter pub run is deprecated in favor of dart run

michael-markl commented 1 week ago

I think your problem is not related to this PR. This PR just gets rid of a warning when running the frontend run configs in intellij.

However, I think I had the same problem as you: there was some problem with protobuf when running the build runner. The problem was/is that the protoc_plugin is compiled for the globally installed dart version, but it seems to necessary to use the dart version from fvm. I made some changes locally to use protobuf_builder instead of our own dart pub for generating protobuf. I can open a PR later today.

Edit: fvm is the nvm for flutter :)

ztefanie commented 1 week ago

Thank you for having a look at this :green_heart:

Edit: fvm is the nvm for flutter :)

Yes, but for nvm if i set a version then node --version will show the version i set in nvm / set the global version, whereas in fvm, if i use dart --version it will still be the global version and not the fvm dart --version. I will have a look at your other PR.

michael-markl commented 1 week ago

fvm does not (by default) set the global version of flutter (which is good imo).

All commands should be preceded by fvm, instead.

The problem was that the protoc_plugin was installed using the global dart version (instead of the one we use in the entitlementcard project via fvm) which frequently led/leads to conflicts...