Commit graph

70 commits

Author SHA1 Message Date
jensjoha b84bfa3526
Faster wrapper script on Windows (#111465) 2022-09-19 08:27:20 +02:00
moko256 45e212e74f
[Windows] Remove the usage of SETLOCAL ENABLEDELAYEDEXPANSION from bat scripts. (#106861) 2022-07-14 21:56:10 +00:00
Michael Thomsen 6e80ad0c9a
Switch from .packages to package_config (#106202) 2022-06-17 14:56:32 -04:00
Ian Hickson 2835c3f116
Consider the FLUTTER_TOOL_ARGS as part of the compilation stamp (#94951) 2022-01-10 15:20:05 -08:00
Jonah Williams b1b0d20a95
[flutter_tools] revert change to SETLOCAL ENABLEDELAYEDEXPANSION (#86000) 2021-07-07 11:10:37 -07:00
Jonah Williams f04508a426
[flutter_tools] dont use SETLOCAL ENABLEDELAYEDEXPANSION unecessarily (#85288) 2021-06-24 22:21:01 -07: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
Jonah Williams 1b8e6b4236
[flutter_tools] fix exit label for batchfile (#62272)
move the final_exit label to the correct script location for the flutter/dart entrypoints.
2020-07-28 10:19:43 -07:00
Jonah Williams 8f59fdd20b
[flutter_tools] move mingit path addition back to flutter.bat (#59369)
fixes #57802

For users without git installed, flutter on windows bundles mingit. This needs to be added to the PATH in the main script, not the executed script, so that it is available to the tool
2020-06-15 09:43:10 -07:00
Christopher Fujino 06cd79d7df
[flutter_tools] Add additional bash entrypoint for running dart sdk directly (#57257) 2020-05-18 12:38:09 -07:00
Ben Konyi 461fe98f98
Disable DartDev when launching flutter_tools (#57143) 2020-05-14 11:42:01 -07:00
Igor Akkerman 135c511ebb
PowerShell executable detection added, fixing usage of PowerShell version >=6 (#56714) 2020-05-11 12:00:02 -07:00
Mike Rogers 57d84adc2d
Fix 2 typos within comments (#52181)
* occure > occur
* occured > occurred
* uptodate > up-to-date
2020-03-08 08:48:26 +00:00
Jonah Williams f90fcba40f
[flutter_tools] disable mirrors in tool snapshot (#51801) 2020-03-02 16:23:10 -08:00
Ian Hickson 449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Jacob MacDonald 3f1f22c26e
dont precompile dependencies when building the flutter tool (#42771) 2019-10-15 13:34:04 -07:00
Ian Hickson 8c6d60bcfd
Move commands into their own shard (#39140) 2019-10-02 12:46:51 -07:00
Jonah Williams fd1291fe5e
pass .packages path to snapshot invocation (#34517) 2019-06-15 10:20:19 -07:00
Jonah Williams d4f8a7f267
disable jit snapshot until we know what is going on here (#30204) 2019-03-29 13:10:36 -07:00
Jonah Williams 0a2175f133
Pass FLUTTER_TOOL_ARGS to snapshot command. (#29938) 2019-03-27 15:24:08 -07:00
Jonah Williams 72605d2406
Switch flutter_tools from script to app-jit snapshot. (#27749) 2019-03-15 19:33:24 -07:00
Chris Bracken cccf44faa6
Log pub return code on failure on Windows (#28356)
When pub fails, log the %ERRRORLEVEL% to help diagnose the root cause of
the pub failure.
2019-02-28 23:53:32 -08:00
Jonah Williams 1e127003ab
update flutter and flutter.bat command to suggest stable branch (#27556) 2019-02-05 15:16:11 -08:00
Devon Carew 88fc38cf9b
don't pass the --packages-dir flag (#27323) 2019-01-31 08:31:03 -08:00
Michael Klimushyn 72b6a7063d
Don't consider a timestamp "newer" when equal (#24251)
Fixes flutter/flutter#22062
2018-11-13 09:48:32 -08:00
Michael Klimushyn 20d0b282d1
Stop comparing modified timestamps in flutter.bat (#23176)
Fixes flutter/flutter#22062
2018-10-18 09:15:24 -07:00
Michael Goderbauer 91dde9074a
No more nasty errors during flutter upgrade/channel on Windows (#21085)
Fixes https://github.com/flutter/flutter/issues/14578.
2018-08-28 09:37:34 -07:00
Michael Goderbauer f17bb519b3
Revert "Copy flutter.bat before execution" (#20678) 2018-08-15 23:20:13 -07:00
Michael Goderbauer 28bc818054
Copy flutter.bat before execution (#20554) 2018-08-15 17:16:36 -07:00
Greg Spencer 01d6444490
Switch from infinite retries on upgrade to 10 retries. (#20450)
This changes the flutter tool to just try 10 times before giving up when running "flutter upgrade". Infinite retries can hang bots, and really don't provide a lot of help: if we've failed to upgrade for for nearly a minute, trying every five seconds, then something is just not responding.

Also, changed the bot default warning level to "normal" from "all", because the solver messages are VERY verbose: several megs of output for doing packages get on Flutter. "normal" will give warnings, user messages and errors, which should be sufficient to diagnose problems on the bots without spamming the log.

I removed the retrying for building the snapshot on flutter.bat because we don't do that on the other platforms, and because I can't imagine how running it again would give a different answer.

I also fixed a problem in the whitespace detection when no files matched the type of file that it is looking for, and removed the code that waits until failure to print the logs on setup, since reducing the log output made a huge difference.
2018-08-11 19:10:14 -07:00
Greg Spencer e60087a1a7
Remove Travis configuration from flutter/flutter (#20288)
This removes the final traces of Travis and Appveyor from the Flutter tree.

I've updated the documentation and fixed a couple of places where scripts look for Travis, and eliminated the dart tools runningOnTravis function (which was unused anyhow).

There are places in the flutter script that used to look for the environment variable TRAVIS. We actually do want to continue to detect that we're running on Travis there, since in the plugins repo we still use Travis (for the moment). In any case, it's OK, because the CI environment variable is set on all of the CI bots (Cirrus, Travis, and Appveyor).

FastLane doesn't have a setup_cirrus equivalent to setup_travis, but it actually doesn't matter there either, since it doesn't do Travis-specific things, and it also looks for the CI environment variable.
2018-08-07 13:41:33 -07:00
Ian Hickson 35346b4966
Increase verbosity on bots during setup and other minor cleanup (#19526)
The verbosity change is to help track down timeouts that currently look like:

```
C:\Windows\Temp\flutter sdk>call bin\flutter.bat config --no-analytics
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine c5a63d28bf3735569c8187753bc490d8351a8363...
Unzipping Dart SDK...
Updating flutter tool...
```
2018-07-20 11:01:45 -07:00
Danny Tuppeny 5ce672b79b
Detect permissions issues running flutter on Windows (#17975)
* Detect permissions issues running flutter on Windows

Fixes #17972.
2018-05-30 08:14:48 +01:00
Michael Goderbauer 63b24639ff
Unblock PowerShell Script before execution (#17658) 2018-05-18 09:56:59 -07:00
Todd Volkert c885015934
Fix download Dart DK step to work for paths with apostrophes (#15137)
Fixes https://github.com/flutter/flutter/issues/15136
2018-03-04 12:15:22 -08:00
Todd Volkert d2dcec22ce
Provide a more helpful error message when we detect the user is tryin… (#15032)
Fixes https://github.com/flutter/flutter/issues/14950
2018-03-01 12:24:25 -08:00
Alexander Aprelev a448994543
Use the Dart SDK built from Flutter engine rather than from dartlang.org (#14610)
* Use engine-built dart sdk

* Download dart-sdk from engine

* Move up deps to fix dart sdk constraint problem

* Update update_dart_sdk.ps1 for Windows

* Fix tests so they pass analysis

* More types for tests

* Roll engine

* Update dart sdk stamp location in flutter.bat

* Add newline
2018-02-14 07:18:25 -08:00
Ian Hickson 9e42e4b88f
New release process (#14061)
Generate the "version" file from git tags.
Remove the old VERSION file and mentions of versions in pubspec.yaml files.
Replace the old update_versions.dart script with a new roll_dev.dart script.
Update "flutter channel".
Update "flutter upgrade", including making it transition from alpha to dev.
Update "flutter --version" and "flutter doctor".
2018-01-18 07:59:06 -08:00
Michael Goderbauer 54e3333182
Use bundled mingit on Windows if available (#14025)
In the packaged ZIP files for Flutter we bundle mingit on Windows to make setup for our users easier (they don't have to download and install git anymore). This change makes Flutter use the bundled mingit if it is available and if git is not installed on the system.

This change will still require that users add `flutter\bin` to their path or they'll have to execute `flutter\bin\flutter.bat` directly. A follow-up PR will add a pre-configured Flutter Console that people can start with a double-click to minimize setup even further.

Also in this PR:
* If 7Zip is not available to unpack the Dart SDK try 7Zip's standalone version.
2018-01-10 16:48:39 -08:00
Leaf Petersen ab874da7be
Roll Dart SDK to 2.0.0-dev.16.0, along with associated package updates (#13857)
Rolling the Dart SDK to 2.0, with associated package updates.  

https://groups.google.com/forum/#!topic/flutter-dev/E22RdKAYjs8
2018-01-10 14:31:28 -08:00
Greg Spencer f29ecba6de
Use .pub-cache from Flutter root, if it exists. (#13358)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.

This is an attempt to re-land: #13248. Includes a fix for the test that makes it work on bots in the presence of PUB_CACHE being set, and no other changes.
2017-12-05 14:46:39 -08:00
Greg Spencer c89cf6ccc6
Reverting my .pub-cache change to figure out why it's still failing. (#13355)
* Revert "Add tests."

This reverts commit 31bad961ff.

* Revert "Use .pub-cache from Flutter root, if it exists. (#13248)"

This reverts commit 72d6bcc3f7.
2017-12-05 12:51:18 -08:00
Greg Spencer 72d6bcc3f7
Use .pub-cache from Flutter root, if it exists. (#13248)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
2017-12-05 12:02:14 -08:00
Alexandre Ardhuin 15601fe55c
Enable lint prefer asserts in initializer lists (#12903)
* enable lint prefer_asserts_in_initializer_lists

* enable --assert-initializer
2017-11-08 22:59:49 +01:00
Ian Hickson 8079b1fbca Retry when pub fails in flutter tool. (#12069)
This ports the five-second retry interval from flutter.bat to the Bash
version. Failures during "pub get" of the flutter tool are common on
Travis and so this should help Travis reliability if nothing else.
2017-09-13 13:45:36 -07:00
Ian Hickson 58718e8bc7 Revert checked-mode patch. (#11086) 2017-07-05 15:34:02 -07:00
Ian Hickson 5f20f83415 Always run the flutter tool in checked mode. (#11069)
(Needs https://github.com/dart-lang/sdk/issues/28519)
2017-07-02 09:34:31 -07:00
Michael Goderbauer edb61cb2ea Add error handling to batch script (#10007) 2017-05-11 14:02:29 -07:00
Michael Goderbauer c256e6d557 Populate PUB_ENVIRONMENT for initial pub get and correctly detect APPVEYOR as bot (#9725)
* Populate PUB_ENVIRONMENT for initial pub get

* review comments

* change order
2017-05-02 11:25:59 -07:00
Michael Goderbauer a097396f56 Optimize EXIT behaviour of batch script (#8799)
Some Windows Versions close the entire shell if EXIT is called without
/B.

This also adds retry logic for downloading the Dart SDK.
2017-03-15 11:08:31 -07:00