Skip to content
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

Please add possibility to check engine version #317

Open
eximius313 opened this issue Feb 18, 2023 · 6 comments
Open

Please add possibility to check engine version #317

eximius313 opened this issue Feb 18, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@eximius313
Copy link

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?

@tobiasht
Copy link
Contributor

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.

@ardera
Copy link
Owner

ardera commented Mar 24, 2023

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.

@eximius313
Copy link
Author

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.

@ardera
Copy link
Owner

ardera commented Mar 24, 2023

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.

@eximius313
Copy link
Author

eximius313 commented Mar 24, 2023

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 ;)

@ardera ardera added the enhancement New feature or request label Mar 25, 2023
@eximius313
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants