Commit Graph

334 Commits

Author SHA1 Message Date
Adam Barth
99d51f5f5a Fix analyzer warnings
Should make Travis green again. Also, add better logging to
dev/update_packages.dart.
2015-11-21 13:39:45 -08:00
Jason Simmons
ae7c97160a Merge pull request #533 from jason-simmons/apk_artifact_cache
Build APKs without a local copy of the engine sources
2015-11-20 16:43:14 -08:00
Jason Simmons
854db78466 Build APKs without a local copy of the engine sources 2015-11-20 16:22:18 -08:00
Seth Ladd
9496de7c80 more verbose error message
undo auto format
2015-11-20 15:34:28 -08:00
Adam Barth
0d3c2d9336 flutter build --engine-src-dir=<garbage> produces poor error message
This patch improves the error message.

Fixes #468
2015-11-20 15:09:04 -08:00
Adam Barth
19fe92e35d Merge pull request #521 from abarth/fix_analyzer
Fix analyzer warnings in updater package
2015-11-20 14:14:39 -08:00
Adam Barth
4cd1fb177a Fix analyzer warnings in updater package
This class was renamed to MojoEventSubscription.
2015-11-20 13:12:27 -08:00
Adam Barth
dc23af9ff1 Merge pull request #513 from abarth/improve_build_help
Be more specific about what `flutter build` does
2015-11-20 12:57:36 -08:00
Jason Simmons
1f83018f86 Download build artifacts from a zip file
This updates the Flutter tools to match the proposed new packaging of artifacts
in the engine release script.
* The GCS URL for artifacts is now gs://mojo/flutter/$revision/$platform
* Categories have been removed from the Artifact class
* All artifacts for a given platform now live in a zip file.  If an artifact
  is not present in the local cache, then the zip will be downloaded and
  extracted.

Note that darwin-x64 artifacts go through a different process that (for now)
continues to use the old format.
2015-11-20 10:27:18 -08:00
Adam Barth
18763e5609 Be more specific about what flutter build does
Fixes #512
2015-11-20 09:14:48 -08:00
Adam Barth
b20a1f4a15 Merge pull request #457 from abarth/asset_error
Improve error message for non-existent asset
2015-11-17 23:07:27 -08:00
Adam Barth
7b75d15d46 Improve error message for non-existent asset
Now we print the name of the asset and the base directory where we looked for
the error instead of throwing a null pointer exception.

Fixes #296
2015-11-17 22:56:00 -08:00
Adam Barth
cada8b3faa Import path.dart as path rather than p
Fixes #311
2015-11-17 22:44:54 -08:00
Adam Barth
f6bd26a3f3 Make flutter run_mojo imply flutter build
This makes run_mojo more similar to flutter start.
2015-11-17 16:19:55 -08:00
Adam Barth
0760c8be7f Merge pull request #446 from abarth/improve_version
Improve flutter --version output
2015-11-17 16:05:08 -08:00
Jason Simmons
ba10546889 Merge pull request #437 from jason-simmons/apk_package
Add a Flutter command that builds an APK using a local build of the e…
2015-11-17 15:27:34 -08:00
Adam Barth
835e7f25fc Improve flutter --version output
Sample output:

```
Flutter
Repository: git@github.com:flutter/flutter.git
Branch: master
Revision: 7be58b1ae0 (62 minutes ago)
```

Fixes #433
2015-11-17 15:24:25 -08:00
Jason Simmons
07556429f2 Add a Flutter command that builds an APK using a local build of the engine
Example:
   cd flutter/examples/stocks
   flutter --engine-src-path /path/to/engine/src apk -o Stocks.apk -m apk/AndroidManifest.xml
2015-11-17 14:54:25 -08:00
Adam Barth
b8e16d7c09 Switch flutter run_mojo over to flutter.mojo
The new flutter.mojo is ready for use.
2015-11-17 14:16:20 -08:00
Hixie
56b9245b1a Allowing us to have a single error seems silly. 2015-11-17 11:08:46 -08:00
Adam Barth
a35b214d89 Merge pull request #421 from abarth/icon_sizes
Add all the icon sizes to the FLX
2015-11-16 23:01:02 -08:00
Adam Barth
a8ab3d6934 Add all the icon sizes to the FLX
Adding all the sizes of all the icons adds about 50 KB to the stocks FLX.
That's probably the right trade-off until we get better at pruning the set of
assets.

Fixes #235
2015-11-16 22:55:35 -08:00
Adam Barth
9e212017fb Add a --version option to flutter
This option just prints the current git revision.

Fixes #40
2015-11-16 22:49:30 -08:00
krisgiesing
725474c6d7 Merge pull request #416 from krisgiesing/run_mojo_fix
Allow flutter engine path to be set when using run_mojo
2015-11-16 17:06:49 -08:00
Kris Giesing
95a2af8b80 Fix analyzer errors 2015-11-16 17:00:55 -08:00
Kris Giesing
57bca7da10 Allow flutter engine path to be set when using run_mojo 2015-11-16 16:42:47 -08:00
Collin Jackson
0aca425a8b Fix #373 Add abbreviation for flutter logs -c 2015-11-16 14:23:18 -08:00
Hixie
8ab229f89c Make the analyzer actually work.
Turns out that ignoring all error lines that match the empty string is a
poor way to go.

Also, we have to update all the example packages now too, since we
analyze them. So just have travis use our update script.

Also, remove flutter_tools' old travis stuff. It's now part of a bigger
repo.

Also, make travis use the dev Dart SDK, since we need the new analyzer.
Stable is way too out of date, e.g. it still complains about libraries
not having names and mixins using 'super', and the strong mode hints are
even more aggressive than on dev.
2015-11-12 15:41:04 -08:00
Hixie
4a5713acc8 Delete analyzer temporary directories 2015-11-12 13:11:41 -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
Adam Barth
90991854e0 Add a flutter upgrade command
This command upgrades the version of flutter that you're using and runs
`pub upgrade` to update the transitive dependencies.
2015-11-12 10:16:13 -08:00
Adam Barth
da0a12c611 Rename sky_tools to flutter_tools 2015-11-10 13:20:35 -08:00
Ian Hickson
0a1385d9a9 Merge pull request #66 from Hixie/better-tests
Run 'pub get' the first time the tests are run
2015-11-10 12:26:42 -08:00
Devon Carew
84c273333c Merge pull request #274 from devoncarew/init_tweak
fix a ws issue in the sample app
2015-11-10 10:43:06 -08:00
Adam Barth
b9bc5e790f Merge pull request #87 from alhaad/run_mojo_devtools
Use --devtools-path flag to run_mojo.
2015-11-10 10:27:28 -08:00
Devon Carew
20c2aa1690 fix a ws issue in the sample app 2015-11-10 08:48:03 -08:00
Hixie
bd69e2c405 Run 'pub get' the first time the tests are run 2015-11-09 13:44:04 -08:00
Adam Barth
7e8b111bcc Search all the build configurations for sky_snapshot
Previously, we assumed the first build configuration would have one. Now we
keep looking until we find one. Also, re-ordered the configurations so that
you'll get the Android one if you have both, which is probably what you would
expect.

Fixes #100
2015-11-09 13:31:49 -08:00
Alhaad Gokhale
7b19d08cc3 Use --devtools flag to run_mojo.
That way we can control if we want to use devtools to run on Linux and
also cleanly separate out the two uses.

R=@jamesr
2015-11-09 12:29:07 -08:00
Adam Barth
6e7f575950 flutter start should give better errors when it can't find main
Now we suggest using -t to specify the main Dart file.

Fixes #53
2015-11-09 11:31:11 -08:00
Ian Hickson
3419068cb3 Port test logic to Dart. 2015-11-09 09:00:49 -08:00
Adam Barth
576795dcc6 Add a CONTRIBUTING.md
This document describes the workflow for contributing code to this repository.
2015-11-08 21:56:20 -08:00
Adam Barth
2710e0f468 Teach flutter init how to depend on flutter using a relative path 2015-11-07 21:30:26 -08:00
Adam Barth
2ed113430a Add dev/run_tests
This script runs the Flutter unit tests. By default, the script assumes you
have compiled a SkyShell in an "engine/src" that's a peer to the "flutter"
directory.
2015-11-06 23:14:17 -08:00
Devon Carew
a469020983 add a flutter.yaml file to the init template 2015-11-06 20:57:35 -08:00
Adam Barth
113500206a Remove the --http option 2015-11-06 20:17:24 -08:00
Jason Simmons
6e0b59fc09 Add a flag that selects which Android device ID is the target for Flutter commands 2015-11-05 15:53:32 -08:00
Adam Barth
fc8cdf4daf Add a command for running unit tests 2015-11-04 23:43:15 -08:00
Matt Perry
4ba8a7f077 Seed the RNG before signing the package. 2015-11-04 14:08:24 -05:00
Adam Barth
3804107e2d Enable --no-http by default
We still have the --http option as a fallback for now. Once we're confident the
--no-http version works, we'll drop the --http support.

Also, create the FLX in a temp directory and then delete the temp directory
when we're done. Finally, pull the Linux artifacts from the cloud storage
bucket that the buildbot is uploading to.
2015-11-03 19:39:47 -08:00
Devon Carew
856f04bee2 Merge pull request #169 from devoncarew/daemon
add a persistent daemon/server mode to sky_tools
2015-11-03 16:01:50 -08:00
Devon Carew
7d0a298b0b start a daemon command
wrap up first daemon implementation
2015-11-03 15:58:02 -08:00
Matt Perry
8ab21d7a9c Depend on the new flx 0.0.5 and remove use of deprecated KeyPair. 2015-11-03 15:28:55 -05:00
Devon Carew
5978f1355d Merge pull request #162 from devoncarew/abstract_os
abstract some OS operations
2015-11-02 13:10:43 -08:00
Devon Carew
5dc4a7cce4 abstract some OS operations 2015-11-02 13:07:56 -08:00
Adam Barth
27118f39ea Add a default maniest path for build 2015-11-02 12:54:31 -08:00
Adam Barth
94b472ff67 Add a --no-http flag to start command
This flag builds a local FLX file and pushes that to the device instead of
using an HTTP server.
2015-10-31 12:18:03 -07:00
Adam Barth
6e076a3522 Merge pull request #148 from alhaad/update_run_mojo_command
Modify run_mojo command to take path to devtools.
2015-10-29 16:22:36 -07:00
Alhaad Gokhale
dde6bd2034 Use a common flag for both android and linux. 2015-10-29 15:29:44 -07:00
Alhaad Gokhale
587f6e27fe Modify run_mojo command to take path to devtools.
Made changes as discussed.
R=@jamesr
2015-10-29 14:36:25 -07:00
Jason Simmons
ef2e038b11 Generalize path handling in flutter init
This will make "-o ." work as expected to initialize a project in the
current directory
2015-10-29 14:33:27 -07:00
Devon Carew
494d1e0140 verify that we're running from the root of a project
remove an unused import

review comments

rename st --> stack
2015-10-29 11:30:44 -07:00
Devon Carew
678af9c045 fix some issues found by strong mode 2015-10-28 13:42:46 -07:00
Matt Perry
828b861fce Change signing code to use shared flx package. 2015-10-26 15:14:01 -04:00
Devon Carew
5dbeb8f018 fix tests on windows
remove a runInShell arg on windows when launching pub
2015-10-23 22:44:56 -07:00
Chinmay Garde
21f91bda52 Merge pull request #115 from chinmaygarde/master
Avoid script snapshot creation if the --precompiled flag is set during builds
2015-10-20 21:44:52 -07:00
Devon Carew
d4940c5cd4 set a min. dep of sdk 1.13 2015-10-20 19:01:05 -07:00
Chinmay Garde
9a67954b66 Avoid script snapshot creation if the --precompiled flag is set during builds 2015-10-20 18:50:19 -07:00
Matt Perry
b458935b84 Support signing flx packages with ECDSA key pair
Adds a --private-key option to the build command, which specifies an ECDSA
private key. When this is provided along with a manifest, the manifest is
prepended to the .flx package and signed with the private key. The manifest
also includes a SHA-256 hash of the zipped content portion of the .flx package.

This is used by the Flutter updater package, to verify that updates are
from the right publisher.
2015-10-19 16:08:53 -04:00
Adam Barth
5670243b53 Sanity check --local-build directory
Fixes https://github.com/flutter/engine/issues/1613
2015-10-19 09:52:56 -07:00
Devon Carew
bb1da703a6 return exit codes on failures 2015-10-17 11:50:23 -07:00
Adam Barth
3c9c31332a run_mojo can't find ArtifactStore.packageRoot
The `run_mojo` command doesn't integrate with `FlutterCommand` and doesn't
understand how to download its toolchain components ahead of time. Eventually
we should teach `run_mojo` how to integrate with the `Toolchain` class, but
until then, we can fix the regression by eagerly setting
`ArtifactStore.packageRoot` again.

Fixes https://github.com/domokit/mojo/issues/475
2015-10-15 20:06:30 -07:00
Adam Barth
dff0edbc97 init command errors out
We were checking for a pubspec.yaml too early.
2015-10-14 15:25:58 -07:00
Adam Barth
f0a1632dd6 Add a --local-build flag to detect engine src paths
A common use case for members of the Flutter team is to have a dependency
override for the flutter package that points back into the engine src tree.
We can use that override to automatically detect the engine src path, which
makes the command line shorter.
2015-10-13 10:35:53 -07:00
Adam Barth
12f75817ce Refactor the build command so that it can be used internally
Instead of calling through `pub` to invoke build, this patch refactors the
build command so that it can be called directly.
2015-10-13 10:00:06 -07:00
Adam Barth
d9af939995 Improve error message when missing the package-root 2015-10-12 14:01:05 -07:00
Adam Barth
0e06feee01 Add some print statements to smooth first run
This patch adds a couple print statements to explain why the first run of
`flutter start` takes a while. (We need to download the APK and install it on
the device.)
2015-10-12 01:33:03 -07:00
Adam Barth
8df5e9f738 Polish up some error handling
This patch improves the error handling for several arbitrary issues I
encountered while experimenting with the tool this evening.
2015-10-12 00:55:13 -07:00
Adam Barth
bdd20661d7 Teach sky_tools about prebuilt artifacts
This patch makes `flutter start` work without a clone of the engine git
repository. Making this work pulled a relatively large refactor of how the
commands interact with application packages and devices. Now commands that want
to interact with application packages or devices inherit from a common base
class that holds stores of those objects as members.

In production, the commands download and connect to devices based on the build
configuration stored on the FlutterCommandRunner. In testing, these fields are
used to mock out the real application package and devices.
2015-10-12 00:03:55 -07:00
Ian Fischer
a6a3f212ee IOSSimulator implementation.
Also fixes some minor bugs with iOS and Android interactions.
2015-10-11 19:36:06 -07:00
Adam Barth
4191ed4921 Don't mention --install
The --install command isn't needed anymore. We automatically detect when
we need to install the APK.
2015-10-11 12:33:59 -07:00
Adam Barth
25eaaefd26 Switch init command over to package:flutter 2015-10-11 11:57:22 -07:00
Devon Carew
7ba6342f88 remove an unused import 2015-10-10 00:00:50 -07:00
Adam Barth
287817f224 Move Command subclasses into commands directory
I'm trying to get a feel for the code by writing some simple cleanup patches.
2015-10-09 23:22:20 -07:00