Commit Graph

275 Commits

Author SHA1 Message Date
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
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
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
da0a12c611 Rename sky_tools to flutter_tools 2015-11-10 13:20:35 -08:00
Ian Hickson
3419068cb3 Port test logic to Dart. 2015-11-09 09:00:49 -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
b4fa3fbbf0 Return to the mojo artifacts for Linux 2015-11-04 14:25:47 -08: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
5dc4a7cce4 abstract some OS operations 2015-11-02 13:07:56 -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
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
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
James Robinson
f7e20f4a46 Check that the platform is linux before downloading linux-x64 binaries 2015-09-25 17:42:28 -07:00
James Robinson
9996d4255e Configure ArtifactStore for all commands and make 'package-root' universal
This makes the 'package-root' option universal for sky_tools and configures the
ArtifactStore with it statically at startup. The actual sky_engine revision
is computed on demand.
2015-09-25 15:56:20 -07:00
James Robinson
b7fc56eb31 Make cached artifact location mirror local builds more closely 2015-09-25 11:27:07 -07:00
James Robinson
f735604aca Add cache command to sky_tools with subcommands for populating/clearing
This adds the following commands to sky_tools:
  sky_tools cache clear: Nukes all local artifacts in the cache
  sky_tools cache populate: Populates the cache with all known artifacts

This is useful both to fix busted caches and to make sure that the cache is
fully populated so that subsequent operations can proceed without needing
network access.
2015-09-22 20:35:31 -07:00
James Robinson
0758c5922f Instantiate ArtifactStore explicit with packageRoot
This teaches commands that need binary artifacts to explicitly instantiate an
instance of the ArtifactStore with the appropriate packageRoot string. The
ArtifactStore can then remember the package root and compute the engine
revision when created and remember those for subsequence calls.
2015-09-22 17:17:01 -07:00
James Robinson
20e5355239 Teach sky_tools mojo_run to run on Android (using mojo devtools)
This teaches sky_tools mojo_run --android to invoke mojo's devtool's mojo_run
script with the right flags for invoking sky_viewer on android. This tells the
devtools script to load sky_viewer.mojo from https://storage.googleapis.com/...
and to load app.flx (or whatever the developer specifies as --app) from the
filesystem using the devtools http server.
2015-09-22 15:25:42 -07:00
James Robinson
542da8ccd5 Adds a run_mojo command that downloads sky_viewer.mojo and runs an flx in it
This initial version assumes the developer has mojo_shell and all other services
sitting on disk somewhere and that they're on linux and only want to run on
linux. This can be generalized down the line to support more use cases. This
downloads the sky_viewer.mojo corresponding to the packages/sky_engine/REVISION
in the developer's directory, so they can specify whatever revision they want.
sky_tools run_mojo downloads sky_viewer.mojo into its cache directory if it is
not present and constructs a command line to pass to mojo_shell that maps the
shebang stamped into the flx to the downloaded sky_viewer.mojo.

Since sky_viewer.mojo lives in the cloud and mojo_shell can load from the cloud
this could also map to an https URL. This should likely be an option.
2015-09-21 22:06:05 -07:00
Devon Carew
a4ff100408 check all the dart code in the project, not just selected libraries 2015-09-18 20:59:32 -07:00
James Robinson
a320e712de Address review feedback from pull request #30 2015-09-18 17:03:51 -07:00
James Robinson
cbc35dfacb Download sky_snapshot from the cloud
This adds logic to download and use the sky_snapshot binary from
Google cloud storage when running the 'sky_tools build' command.
The downloaded binary is put into lib/cache/... The binary is
chosen to match the REVISION in the sky_engine package in the
packages directory of whichever package the user wishes to
build a flx from.

Known issues:
*) Assumes linux-x64 host
*) Assumes download will always produce valid executable
*) No clearing of stale cache entries
2015-09-18 16:58:57 -07:00
Adam Barth
a75e79f0ce Address review comments from @iansf 2015-09-17 14:02:55 -07:00
Adam Barth
cf41a63396 Add a build command to sky_tools
This command will produce an flx package. Currently, this command doesn't work
because we don't have the Flutter compiler downloaded from Google storage yet.
A future patch will make that happen.
2015-09-17 13:37:53 -07:00