Commit Graph

29 Commits

Author SHA1 Message Date
John McDole
021b2b3627
Ensure engine.version is up to date in the monorepo (#160668)
`update_dart_sdk.(ps1|sh)` is called too late and needs to be called
from `shared.(bat|sh)`.

Fixes #160640
2024-12-20 20:17:27 +00:00
Matan Lurey
712cf654d1
Remove --disable-dart-dev across flutter/flutter. (#154280)
As per the Dart CLI team and @bkonyi, this is no longer providing value and we shouldn't cargo-cult it.

Work towards https://github.com/flutter/flutter/issues/154268.
2024-08-29 22:50:04 +00:00
Slava Egorov
4a6fbef83f
Use "run --resident" for flutter-dev. (#153905)
This makes subsequent runs much faster by allowing to skip compilation to Kernel at the cost of introducing a bit of spam into the output when it starts resident compiler for the first time. Seems like a fine trade-off for dev-mode command.

```console
$ time flutter-dev -h
...
________________________________________________________
Executed in    5.32 secs      fish           external
   usr time  438.69 millis    0.09 millis  438.60 millis
   sys time  111.91 millis    2.42 millis  109.48 millis

$ time flutter-dev -h
...
________________________________________________________
Executed in  579.14 millis    fish           external
   usr time  433.87 millis    0.08 millis  433.79 millis
   sys time  109.27 millis    2.57 millis  106.70 millis

```
2024-08-22 16:19:03 +00:00
Matan Lurey
b883b2337d
Actually run flutter-dev from source (turns out bash is NP-hard) (#153863)
Fixes
https://github.com/flutter/flutter/pull/153599#issuecomment-2302587254.
2024-08-21 15:05:54 -07:00
Matan Lurey
f0a37e70e5
Add a bin/flutter-dev script, for running the flutter command-line tool from source (#153599)
Not so long ago I remember a very informal conversation that went something like this:

> @matanlurey: I wish I could pass `--dev` or something to `flutter` to run from source.
>
> @christopherfujino: I get what you want, but I don't want to overload the tool with more dev-only things. I would consider a script like `flutter-dev` that does that thing, though.
>
> @matanlurey: Cool, I might send a PR!

So uh, here it is 6-9 months later. Suggestions welcome.
2024-08-21 16:56:22 +00:00
Christopher Fujino
b0bc023f24
[flutter_tools] do not try to build tool from dart.sh (#129186)
Fixes https://github.com/flutter/flutter/issues/121894
2023-11-03 00:42:25 +00:00
Ian Hickson
c4e1a1b387
Fix locking to work with flutter and dart running simultaneously (#133350) 2023-08-25 21:30:07 +00:00
Christopher Fujino
3246808cd2
[flutter_tools] cache flutter sdk version to disk (#124558)
Fixes https://github.com/flutter/flutter/issues/112833

Most of the actual changes here are in [packages/flutter_tools/lib/src/version.dart](https://github.com/flutter/flutter/pull/124558/files#diff-092e00109d9e1589fbc7c6de750e29a6ae512b2dd44e85d60028953561201605), while the rest is largely just addressing changes to the constructor of `FlutterVersion` which now has different dependencies.

This change makes `FlutterVersion` an interface with two concrete implementations:

1. `_FlutterVersionGit` which is mostly the previous implementation, and
2. `_FlutterVersionFromFile` which will read a new `.version.json` file from the root of the repo

The [`FlutterVersion` constructor](https://github.com/flutter/flutter/pull/124558/files#diff-092e00109d9e1589fbc7c6de750e29a6ae512b2dd44e85d60028953561201605R70) is now a factory that first checks if `.version.json` exists, and if so returns an instance of `_FlutterVersionFromGit` else it returns the fallback `_FlutterVersionGit` which will end up writing `.version.json` so that we don't need to re-calculate the version on the next invocation.

`.version.json` will be deleted in the bash/batch entrypoints any time we need to rebuild he tool (this will usually be because the user did `flutter upgrade` or `flutter channel`, or manually changed the commit with git).
2023-06-15 00:20:30 +00:00
Christopher Fujino
7d767270b2
[flutter_tools] replace --no-analytics with --suppress-analytics (#123133)
[flutter_tools] replace --no-analytics with --suppress-analytics
2023-03-21 19:18:57 +00:00
Sigurd Meldgaard
1fd84f88e9
Always use user-level pub cache (#121802)
Use the pub cache resolved by pub itself.
To add packages to the flutter.zip download they are packaged as tar.gz and added to the pub-cache on first run by using  `pub cache preload`.
2023-03-13 08:38:17 +01:00
Sigurd Meldgaard
7a28078509
Use dart pub instead of dart __deprecated pub (#121605) 2023-03-06 11:23:12 +01:00
Deokgyu Yang
db8d1a4417
Add MSYS2 detection on Windows Terminal (#117612)
As the results of "uname -s" command is like the below on MSYS2 on
Windows Terminal,

MSYS_NT-10.0-22621

This patch fixes the Flutter command working on this kind of systems.

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
2023-01-12 22:15:11 +00:00
jensjoha
9c588f32b8
Fix flutter tool crash on upgrade caused by app-jit (#111879)
Fix flutter tool crash on upgrade caused by app-jit
2022-09-20 08:05:18 +02:00
jensjoha
0abb98d8aa
Use app-jit snapshot for flutter tools (#111459) 2022-09-19 10:36:53 +02:00
Michael Thomsen
6e80ad0c9a
Switch from .packages to package_config (#106202) 2022-06-17 14:56:32 -04:00
Christopher Fujino
bb4a5fa7ab
[flutter_tools] exec rather than spawn subprocess from bin/internal/shared.sh (#99871) 2022-03-14 13:35:18 -07:00
Ian Hickson
2835c3f116
Consider the FLUTTER_TOOL_ARGS as part of the compilation stamp (#94951) 2022-01-10 15:20:05 -08:00
Sigurd Meldgaard
bce366203a
Stop calling top level pub (#89032)
* Use `dart __deprecated_pub` instead of `pub` to invoke pub from tools

The top level `pub` commmand has been deprecated and will print
a message. It is however implemented via the __deprecated_pub command
that prints no message.
2021-08-30 10:40:10 -07:00
Ian Hickson
d3c17acf9d
Run "pub global activate devtools" before overall_experience_test (#85812) 2021-07-12 14:36:05 -07:00
Jonah Williams
fbf3c4e41c
make pub super verbose for LUCI CI (#80319) 2021-04-12 17:42:25 -07:00
Jenn Magder
891511d58f
Exclude CI from tool root check (#78885) 2021-03-23 14:57:01 -07:00
Ben Konyi
357dcc96a3
Suppress 'Info: Compiling without sound null safety' message when building flutter_tools (#74740)
The CFE now logs to stdout by default when compiling a program which has
non-null-safe dependencies. Since flutter_tools has not yet migrated, we
need to suppress this message when compiling the tool.

Fixes https://github.com/flutter/flutter/issues/74366
2021-01-26 15:05:18 -08:00
Marcus Tomlinson
5f76bfb4af
Add the ability to inject a bootstrap script (#66897) 2020-09-29 19:24:21 +01:00
Jonah Williams
f1472e1fc4
[flutter_tools] only lock if an upgrade/download will be performed (linux/macos) and output building messages to stderr (#65422)
Currently an invocation of flutter/dart will always attempt to acquire a lock. This can pose problems for tools that attempt to run multiple dart/flutter instances.

Instead update the lock logic (on Linux/macOS) so that we only attempt to acquire it if an update/snapshot needs to be performed. To avoid repeatedly performing downloads/snapshots if multiple flutter/dart invocations are fired off concurrently when an update needs to be performed, do a second check of the download/snapshot condition after the lock is released.

Additionally, moves all of the building/debug output to stderr on both the bash and batch scripts. This allows machine mode consumption of the tool to ignore needing to parse/handle the rebuild messages.
2020-09-22 17:44:08 -07:00
Greg Spencer
6db22118ad
Make flutter and dart scripts invoke their batch file equivalents on Windows (#59789)
This makes the flutter and dart scripts invoke their batch file equivalents if running under MINGW (i.e. git-bash) on Windows.

This allows for proper locking, and makes sure that people aren't using two different (and non-mutally-aware) locking systems when running flutter on Windows.

I also fixed a couple of places where we look for MINGW32, which fails under MINGW64. It just looks for MINGW now.
2020-06-18 13:29:24 -07:00
liyuqian
42e02d60d3
Reland non-breaking "Add clipBehavior to widgets with clipRect #55977" (#59364)
* Revert "Revert "Add clipBehavior to widgets with clipRect (#55977)" (#58344)"

This reverts commit 1d395c5e18.

* Add missed Overflow
2020-06-17 10:57:40 -07:00
Greg Spencer
5267d98772
Revert flutter command to shlock when flock isn't available (#58281)
This reverts the flutter command to use shlock when flock isn't available. It seems that the mkdir method isn't as reliable as we want. I think that this is because the trap isn't always be executed, which is why I think that shlock uses PIDs to help it be more reliable. Unfortunately, that means that we're back to not working over network shares (which is where things were before I moved to the mkdir method, so not really a regression). I did leave in the mkdir method for platforms that have neither flock nor shlock (which should be very few and far between, but still), so at least we'll do some locking there now.
2020-06-01 11:24:53 -07:00
Mehmet Fidanboylu
1d395c5e18
Revert "Add clipBehavior to widgets with clipRect (#55977)" (#58344)
This reverts commit cd593dae19.
2020-05-31 07:41:50 -07:00
Christopher Fujino
30fed049fa
[flutter_tools] remove execute permissions on shared.sh, and move off path (#58267) 2020-05-29 16:03:02 -07:00