leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
869 stars 127 forks source link

Make Patrol CLI aware of Patrol package version #2330

Open zoskar opened 3 weeks ago

zoskar commented 3 weeks ago

Use case

When new Patrol CLI version is released, users receive prompt for updating it whenever they run any patrol command.

Update available! 3.0.1 → 3.1.0
Run patrol update to update

It can lead to some problems:

  1. New CLI might not be compatible with used patrol version (it recently happened for CLI 3.1.0 which introduced tags). Users might unknowingly update the CLI, which could break tests locally.
  2. Users have to be aware of compatibility table
  3. It's difficult to manage projects with multiple automation engineers as they have to sync they CLI updates (kind of)

Proposal

In earlier discussions it was decided that CLI should be aware of patrol package version. This would allow the Update available prompt to include compatibility information. (for example warn users for packages version mismatch or list minimum patrol package version for the latest CLI version). We should keep in mind that some developers work on multiple projects using different Patrol versions. Because of that, maybe patrol downgrade should be considered (or some other way to switch versions more conveniently)