Commit graph

52 commits

Author SHA1 Message Date
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
Michael Goderbauer e2dccc5e48 Ensure compatibility with older PowerShell versions and better error handling (#8652)
This should make our scripts compatible with PowerShell 2 or newer. PowerShell 2 was released in October 2009 and shipped with Windows 7 as default. (I suspect the scripts are now also compatible with PowerShell 1, but that's unconfirmed). This fixes #8606.

The PR also introduces better error handling when Flutter fail to download the Dart SDK to fix #8627.
2017-03-08 10:52:07 -08:00
Michael Goderbauer 2d4e4dd6dc Fix timestamp comparison in BAT file (#8407) 2017-02-24 15:26:36 -08:00
Michael Goderbauer b65ed45222 Improvments to bat file (#8377)
Mainly: Don't call out to PoerShell (expansive!) if Dart SDK is upto date.
2017-02-23 12:09:52 -08:00
Michael Goderbauer a49c854f67 Exit Code Fixes for Windows (#8006)
* return 1 when checks in `flutter.bat` fail
* don't assume file extension of git (depending on the system it can be `git.exe` or `git.bat`)
2017-02-08 21:51:11 -08:00
Michael Goderbauer 6d41c704b9 Preserve exit code on Windows (#7987) 2017-02-08 14:46:47 -08:00
Michael Goderbauer e742b901b8 Tiny simplification of launch scripts (#7949)
Call `pub upgrade` instead of manually deleting `pubspec.lock` and then calling `pub get`. `pub upgrade` ignores the `pubspec.lock`, but is otherwise identically to 'pub get' (https://www.dartlang.org/tools/pub/cmd/pub-upgrade).
2017-02-07 17:15:34 -08:00
Michael Goderbauer e01470a813 Lock Cache before downloading Dart SDK on Windows (#7931) 2017-02-07 15:02:10 -08:00
Michael Goderbauer bf9bbcb4f0 Honor %FLUTTER_TOOL_ARGS% on Windows (#7929) 2017-02-07 10:28:33 -08:00
Michael Goderbauer c234d405af Replace bin/flutter.ps1 with bin/flutter.bat (#7713)
fixes https://github.com/flutter/flutter/issues/7654
2017-01-27 23:12:33 -08:00
Michael Goderbauer 06a0836d79 Add a .bat entry point for flutter tools (#7701)
Currently, this only calls out to the PowerShell Script, which is kind of slow. In the future, we will transfer more logic from PowerShell to cmd for faster starup time.
2017-01-27 10:58:32 -08:00
Michael Goderbauer 51dc83dd80 Launch Flutter Tools on Windows. (#7613)
This brings the Windows script up to par with the Linux/Mac script.

`flutter doctor` works.

There are two scripts (`bin/flutter` and `bin/internal/update_dart-sdk`), which are platform dependent (bash script on Linux/Max, PowerShell script on Windows) and we need to keep an eye on making sure that their logic stays in sync. Both scripts are rather simple and I am not expecting many changes to them. I also made sure that both versions follow the same structure to make it easier to keep them consistent.

Required for https://github.com/flutter/flutter/issues/138
2017-01-24 10:58:11 -08:00
Devon Carew 7ad1e38eac Fix windows crash (#3236)
* better messaging about windows support

* fix lints
2016-04-11 08:34:01 -07:00
Adam Barth 2e062dfab4 Use --packages rather than --package-root
The .packages file is replacing the packages directory of symlinks.
2016-03-28 15:01:25 -07:00
Adam Barth c83b663afd Remove FLUTTER_DEV environment var
This check is triggering even for folks who don't have FLUTTER_DEV set, which
is breaking their toolchain because we're not running `pub get` on the
flutter_tools package.
2016-02-09 12:55:54 -08:00
Devon Carew 7425f60614 add a dev mode to the flutter script 2016-02-05 22:29:34 -08:00
Collin Jackson beaffecb7b fix #1443 ensure engine is the correct version 2016-02-01 13:11:30 -08:00
Nathan Kerr ed297f476a Need to change working directories so that the command works when called from outside the flutter directory.
Removed accidental debug code.
2015-11-14 11:22:48 -08:00
Hixie a0227cab15 flutter analyze command
Other changes in this patch:
- Make the 'flutter' tool say "Updating flutter tool..." when it calls
  pub get, to avoid confusion about what the pub get output is about.
- Make the bash flutter tool call pub get when the revision has
  changed. (This was already happening on Windows.)
- Fix a raft of bugs found by the analyzer.
- Fix some style nits in various bits of code that happened to be near
  things the analyzer noticed.
- Remove the logic in "flutter test" that would run "pub get", since
  upon further reflexion it was determined it didn't work anyway.
  We'll probably have to add better diagnostics here and say to run the
  updater script.
- Remove the native velocity tracker script, since it was testing code
  that has since been removed.

Notes on ignored warnings:
- We ignore warnings in any packages that are not in the Flutter repo or
  in the author's current directory.
- We ignore various irrelevant Strong Mode warnings. We still enable
  strong mode because even though it's not really relevant to our needs,
  it does (more or less accidentally) catch a few things that are
  helpful to us.
- We allow CONSTANTS_LIKE_THIS, since we get some of those from other
  platforms that we are copying for sanity and consistency.
- We allow one-member abstract classes since we have a number of them
  where it's perfectly reasonable.
- We unfortunately still ignore warnings in mojom.dart autogenerated
  files. We should really fix those but that's a separate patch.
- We verify the actual source file when we see the 'Name non-constant
  identifiers using lowerCamelCase.' lint, to allow one-letter variables
  that use capital letters (e.g. for physics expressions) and to allow
  multiple-underscore variable names.
- We ignore all errors on lines that contain the following magic
  incantation and a "#" character:
    // analyzer doesn't like constructor tear-offs
- For all remaining errors, if the line contains a comment of the form
    // analyzer says "..."
  ...then we ignore any errors that have that "..." string in them.
2015-11-12 12:23:29 -08:00