flutter-pi icon indicating copy to clipboard operation
flutter-pi copied to clipboard

Please add possibility to check engine version

Open eximius313 opened this issue 2 years ago • 6 comments

Because every Flutter version must match exact version of the Engine, it is really hard to keep track which RPI has which version, if one has plenty of RPi operating. Could you please add a command like flutter-pi --engine-version which displays the current engine version?

eximius313 avatar Feb 18 '23 10:02 eximius313

That´s a great idea. I guess it could be as simple as looking up the hash code to get it´s corresponding version number. So when you get one of the following errors Invalid kernel binary format version, Invalid SDK hash or Invalid engine hash you would also get a message with the correct version.

tobiasht avatar Mar 14 '23 09:03 tobiasht

Showing the installed engine version is possible with some changes to the engine binaries installer, but showing the correct engine version for a flutter app is probably impossible.

But I think showing the installed engine version is still useful enough, so I'll implement that

Also, it's possible to bundle the flutter engine with an asset bundle, instead of installing it systemwide on a target machine. That'll probably result in less version mismatches. Currently, that's a bit harder to use than installing systemwide, but in the future, with some changes to the flutter SDK, that might be easier.

ardera avatar Mar 24 '23 14:03 ardera

Showing the installed engine version is possible with some changes to the engine binaries installer, but showing the correct engine version for a flutter app is probably impossible.

I think that the former should be enough.

But I think showing the installed engine version is still useful enough, so I'll implement that

That is awesome! Thank you

Also, it's possible to bundle the flutter engine with an asset bundle, instead of installing it systemwide on a target machine. That'll probably result in less version mismatches. Currently, that's a bit harder to use than installing systemwide, but in the future, with some changes to the flutter SDK, that might be easier.

How to do that?

By the way - today I was upgrading flutter-pi and I wanted to check the current version with flutter-pi --version and I've learnt that it is not possible either.

eximius313 avatar Mar 24 '23 19:03 eximius313

Also, it's possible to bundle the flutter engine with an asset bundle, instead of installing it systemwide on a target machine. That'll probably result in less version mismatches. Currently, that's a bit harder to use than installing systemwide, but in the future, with some changes to the flutter SDK, that might be easier.

How to do that?

Just put the fitting libflutter_engine.so into the asset bundle directory (without .debug or .release suffix, just libflutter_engine.so) - flutter-pi will first attempt to load the engine from there and only fall back to the systemwide flutter engine if it doesn't a flutter engine there. (Not really documented, I know)

By the way - today I was upgrading flutter-pi and I wanted to check the current version with flutter-pi --version and I've learnt that it is not possible either.

Right, yeah maybe some versioning mechanism there would be useful as well.

ardera avatar Mar 24 '23 20:03 ardera

Thank you.

Just put the fitting libflutter_engine.so into the asset bundle directory (without .debug or .release suffix, just libflutter_engine.so) - flutter-pi will first attempt to load the engine from there and only fall back to the systemwide flutter engine if it doesn't a flutter engine there. (Not really documented, I know)

I think it's worth documenting it, because for example for me - it's a game changer ;)

eximius313 avatar Mar 24 '23 23:03 eximius313

Just put the fitting libflutter_engine.so into the asset bundle directory (without .debug or .release suffix, just libflutter_engine.so) - flutter-pi will first attempt to load the engine from there and only fall back to the systemwide flutter engine if it doesn't a flutter engine there. (Not really documented, I know)

Today I've tested this undocumented feature and it works just fine in newest version of flutter-pi, but didn't work on a version from about 9 months ago (I don't know which version exactly was it, because of lack flutter-pi --version :D)

Nevertheless, I think that both flutter-pi --version and flutter-pi --engine-version will be a great enhancement

eximius313 avatar Apr 24 '23 15:04 eximius313