Commit Graph

26 Commits

Author SHA1 Message Date
Ian Hickson
9c7a9e779f
Give channel descriptions in flutter channel, use branch instead of upstream for channel name (#126936)
## How we determine the channel name

Historically, we used the current branch's upstream to figure out the current channel name. I have no idea why. I traced it back to https://github.com/flutter/flutter/pull/446/files where @abarth implement this and I reviewed that PR and left no comment on it at the time.

I think this is confusing. You can be on a branch and it tells you that your channel is different. That seems weird.

This PR changes the logic to uses the current branch as the channel name.

## How we display channels

The main reason this PR exists is to add channel descriptions to the `flutter channel` list:

```
ianh@burmese:~/dev/flutter/packages/flutter_tools$ flutter channel
Flutter channels:
  master (tip of tree, for contributors)
  main (tip of tree, follows master channel)
  beta (updated monthly, recommended for experienced users)
  stable (updated quarterly, for new users and for production app releases)
* foo_bar

Currently not on an official channel.
ianh@burmese:~/dev/flutter/packages/flutter_tools$
```

## Other changes

I made a few other changes while I was at it:

* If you're not on an official channel, we used to imply `--show-all`, but now we don't, we just show the official channels plus yours. This avoids flooding the screen in the case the user is on a weird channel and just wants to know what channel they're on.
* I made the tool more consistent about how it handles unofficial branches. Now it's always `[user branch]`.
* I slightly adjusted how unknown versions are rendered so it's clearer the version is unknown rather than just having the word "Unknown" floating in the output without context.
* Simplified some of the code.
* Made some of the tests more strict (checking all output rather than just some aspects of it).
* Changed the MockFlutterVersion to implement the FlutterVersion API more strictly.
* I made sure we escape the output to `.metadata` to avoid potential injection bugs (previously we just inlined the version and channel name verbatim with no escaping, which is super sketchy).
* Tweaked the help text for the `downgrade` command to be clearer.
* Removed some misleading text in some error messages.
* Made the `.metadata` generator consistent with the template file.
* Removed some obsolete code to do with the `dev` branch.

## Reviewer notes

I'm worried that there are implications to some of these changes that I am not aware of, so please don't assume I know what I'm doing when reviewing this code. :-)
2023-05-23 19:59:20 +00:00
hellohuanlin
0916375f44
[tools]Build IPA validation UI Polish (#116744)
* [tools]some ui polish for build ipa validation

* do not print out a few success validations

* rename installed type to success for more general usage

* forgot nit after reverting custom validation types and re-use doctor types
2022-12-15 14:43:32 -08:00
Jenn Magder
49f5980970
Suggest Rosetta when x64 binary cannot be run (#114558)
* Suggest Rosetta when x64 binary cannot be run

* validator

* Adjust error message
2022-12-01 19:17:07 +00:00
Christopher Fujino
9532b91c74
[flutter_tools] normalize windows file path cases in flutter validator (#115889)
* normalize windows file path cases in flutter validator

* fix

* make comparison more accurate by checking .startsWith() rather than .contains()

* fix method name

* call path.canonicalize

* fix
2022-11-29 23:46:48 +00:00
Christopher Fujino
483e1d9a6f
Validate bins on path in doctor (#113106) 2022-10-20 18:02:10 +00:00
Anurag Roy
f1df76e963
[flutter_tools] Suggest actions to fix failing FlutterValidator (#106355) 2022-07-26 19:47:07 +00:00
Anurag Roy
47b40601d7
[flutter_tools] Have FlutterValidator fail on non-ideal git config (#103259) 2022-06-20 19:05:07 +00:00
Jenn Magder
a56c5e51ae
Migrate some test files to null safety (#104469) 2022-05-24 16:53:08 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Zachary Anderson
fb29403c42
Revert "feat(flutter_tools): Added doctor path printing on verbose" (#96414) 2022-01-10 15:35:13 -08:00
crisboarna
f8e70a8463
feat(flutter_tools): Added doctor path printing on verbose (#95453) 2022-01-06 13:50:19 -08:00
Kenzie (Schmoll) Davisson
7748731903
Add DevTools version to flutter --version and flutter doctor -v output. (#93065)
* Add DevTools version to `flutter --version` output.

* review comments

* fix test

* add explanatory comment

* dummy commit to kick bots

Co-authored-by: Christopher Fujino <christopherfujino@gmail.com>
2021-11-11 14:40:22 -08:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be24.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Alexandre Ardhuin
2c998d8be7
fix indentation of class members (#84293) 2021-06-10 11:29:03 -07:00
Alexandre Ardhuin
e467018d06
alignment of doc comments and annotations (#84256) 2021-06-09 07:54:02 -07:00
Jonah Williams
064eae8c38
[flutter_tools] remove mocks and fix fake imports (#81309) 2021-04-27 11:51:41 -07:00
Jenn Magder
56c0002c47
Adopt FakeProcessManager.empty (#80480) 2021-04-15 14:19:02 -07:00
Anurag Roy
ce3c3d2a21
[flutter_tools] Show upstream remote in flutter doctor -v (#80101) 2021-04-13 14:04:08 -07:00
Jenn Magder
e8cd4827a0
Migrate fake_process_manager to null safety (#80018) 2021-04-08 15:19:07 -07:00
Jenn Magder
a2f67720ef
Migrate test/src/common to null safety (#79907) 2021-04-06 22:55:03 -07:00
Jenn Magder
79f1689f6a
Migrate doctor_validator to null safety (#79682) 2021-04-05 11:54:54 -07:00
Jonah Williams
721702717d
[flutter_tools] replace MockFlutterVersion usage with fake where possible, move from context (#77390) 2021-03-05 14:04:03 -08:00
Jonah Williams
74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
Jonah Williams
1271447bbe
[flutter_tools] remove globals from FlutterValidator, add documentation and move tests to new file (#67234)
Remove globals from the flutter validator class, and refactor the tests into a separate file. Applies some other cleanup like adding doc comments, and making the doctor validator work like it is documented to work - removing the gen_snapshot check if the artifact is not downloaded instead of downloading all android artifacts.

#47161
2020-10-05 17:58:56 -07:00