Commit Graph

132 Commits

Author SHA1 Message Date
Michael Goderbauer
ae90581124 Fix build (#11186)
Was broken by dba29aa0fc, which apprently has been pushed directly to master without running through Travis?
2017-07-12 17:24:38 -07:00
Siva Chandra
dba29aa0fc Select the correct conditional import when building dart dependencies.
Fixes #9413.

For more info on conditional imports, see
https://github.com/munificent/dep-interface-libraries/blob/master/Proposal.md.
2017-07-12 16:30:14 -07:00
Ian Hickson
0f1a703a6b More documentation (#10589) 2017-06-08 17:13:03 -07:00
Ian Hickson
292abf7223 "flutter packages pub ..." to passthrough to dart pub (#10044) 2017-05-12 15:40:35 -07:00
Michael Goderbauer
ad1c497c03 Do not lower-case paths during canonicalization. (#9571)
* Do not lower-case paths during canonicalization.

This breaks hot reload on some platfroms with case insensitive file systems.

* Add unit tests
2017-04-25 10:34:43 -07:00
Devon Carew
a97060e095 don't pass in --no-packages-dir (#9476) 2017-04-19 15:26:24 -07:00
Alexandre Ardhuin
8bcf302e23 use conditional assignment (#9252) 2017-04-07 21:41:17 +02:00
Alexandre Ardhuin
4c530d5e8c prefer_final_fields (#8967) 2017-03-29 21:21:46 +02:00
Kevin Moore
358e1cd2e1 Teach flutter_tools to populate PUB_ENVIRONMENT (#8962)
* Teach flutter_tools to populate PUB_ENVIRONMENT

Will allow telemetry reporting on pub.dartlang.org once
flutter moves to 1.23.0-dev.10.0

* review changes
2017-03-22 13:25:38 -07:00
Ian Hickson
0edc4d2a76 Make hot mode a little less aggressive about catching errors. (#8743)
It was resulting in weird situations where the tool would dump an
error message and stack but not quit, or would fail hard but then just
hang.

Instead, specifically catch errors you expect. As an example of this,
there's one error we expect from the DartDependencySetBuilder, so we
catch that one, turn it into a dedicated exception class, then in the
caller catch that specific exception.
2017-03-13 14:50:30 -07:00
Devon Carew
71aaa5db91 add --offline to flutter packages get (#8707) 2017-03-13 14:04:27 -07:00
Michael Goderbauer
644e7b131d Faster hot reload (#8600)
This implements the `DartDependencySetBuilder` completely in Dart instead of calling out to `sky_snapshot` (Linux/Mac) or `gen_snapshot` (Windows) and allows us to use the same code path on all supported host platforms.

It also slightly reduces hot reload times on Linux from ~750ms to ~690ms for the unchanged flutter_gallery app and significantly reduces hot reload times on Windows from almost 1.5s to just slightly slower than on Linux.

This change will also allow us to retire `sky_snapshot` completely in the future.
2017-03-07 13:09:48 -08:00
Michael Goderbauer
d5b502bbc2 use new --print-deps option (#8577) 2017-03-06 10:55:32 -08:00
Michael Goderbauer
e0c51480d2 canonicalize paths in devfs (#8565) 2017-03-03 18:21:01 -08:00
Chris Bracken
7a09316cd0 Declare locals final where not reassigned (flutter_tools) (#8570) 2017-03-03 17:50:46 -08:00
Michael Goderbauer
d579d58702 Enable Hot Reload on Windows (backed by gen_snapshot) (#8512)
* Enable Hot Reload on Windows (backed by gen_snapshot)

\o/

Two caveats:
* Hot Reload on Windows is slower than on other platforms because gen_snapshot is slower then sky_snapshot
* We currently cannot hot reload projects with spaces in the path

* enable tests
2017-03-02 10:57:27 -08:00
Michael Goderbauer
65835af4e6 Roll forward #8467 (#8477)
* Revert "Revert "Simplify path handling logic in dependency checker and devFS (#8414)" (#8467)"

This reverts commit 96ba7f76d2.

* Intentionally use a self-package URI in flutter_gallery

* tests to catch problems with self-package imports
2017-02-28 17:21:17 -08:00
Michael Goderbauer
96ba7f76d2 Revert "Simplify path handling logic in dependency checker and devFS (#8414)" (#8467)
This reverts commit e7bde11cc3.

Reason: broke hot reload when using "package:" style imports for sources
within the same project.
2017-02-28 11:17:26 -08:00
Michael Goderbauer
e7bde11cc3 Simplify path handling logic in dependency checker and devFS (#8414)
* Simplify path handling logic in dependency checker and devFS

Simplification will make it easier to port this to Windows.

* Roll Engine to 0a7b177c330367904597a6129b3eb653d29dfca0
2017-02-27 11:01:14 -08:00
Michael Goderbauer
cd8434d931 Refactor how Artifacts are located (#8234)
Artifacts are now located in a central place.
This will enable us to downlaod artifacts when we need them (instead of
downloading them all upfront).
This also makes replacing sky_snapshot with gen_snapshot easier.
2017-02-16 23:10:11 -08:00
Michael Goderbauer
5e54fd54d9 Ban package:path from Flutter Tools (#8119) 2017-02-13 17:45:50 -08:00
Devon Carew
d89f438699 improve the logger ui a bit for elapsed times (#7960)
* improve the logger ui a bit for elapsed times

* invert param

* update daemon.dart
2017-02-08 08:25:36 -08:00
Devon Carew
f1f53460a4 remove sdk summaries (#7957) 2017-02-07 17:59:10 -08:00
Michael Goderbauer
82f887de07 Fix Flutter Tools Tests to run on Windows (#7878) 2017-02-05 22:58:49 -08:00
Todd Volkert
417c2f25fc Migrate flutter_tools to use package:platform (#7642) 2017-01-25 16:06:41 -08:00
Ian Hickson
cbda208b4b Reduce the amount of spam from analyze watch. (#7582)
See https://github.com/dart-lang/sdk/issues/28463, which I think is a
regression.

This also fixes the regression introduced by
https://codereview.chromium.org/2559773002 whereby we were no longer
checking any of the lints.
2017-01-22 16:43:24 -08:00
Phil Quitslund
8dc1634be5 Stop building unlinked summaries for packages. (#7538)
Stop building (unused) unlinked summaries for packages.

Improves update speed considerably (for `n` packages it saves us `n` needless calls to `pub get`).
2017-01-19 09:11:41 -08:00
Phil Quitslund
41251d2450 Update to Dart SDK 1.22.0-dev.8.0. (#7461)
* Update to Dart SDK `1.22.0-dev.6.0`.

* Update SDK summary generation to create spec and strong summaries.

* Updated to dev.8.0.

* Fixed console out.
2017-01-17 09:50:52 -08:00
Yegor
7a10ed9315 Revert "Bump to Dart SDK 1.22.0-dev.5.0 (#7382)" (#7435)
This reverts commit ef25a20337 to unbreak the build.
2017-01-10 18:14:58 -08:00
Phil Quitslund
ef25a20337 Bump to Dart SDK 1.22.0-dev.5.0 (#7382)
* Bump Dart SDK to 1.22.0-dev.5.0.

* Suppress spurious `FutureOr` type warning.

* Fixed linter dep post merge.

* Formatting tweaks.
2017-01-10 14:55:31 -08:00
Todd Volkert
016b5ab0cc Force all dart:io usage to go through 'base/io.dart' (#7390)
This ensures that accidental usages of dart:io's
file API don't creep in over time.
2017-01-09 08:37:00 -08:00
Todd Volkert
8bb270342e Update flutter_tools to use package:file throughout (#7385)
This removes direct file access from within flutter_tools
in favor of using `package:file` via a `FileSystem` that's
accessed via the `ApplicationContext`.

This lays the groundwork for us to be able to easily swap
out the underlying file system when running Flutter tools,
which will be used to provide a record/replay file system,
analogous to what we have for process invocations.
2017-01-06 16:51:44 -08:00
John McCutchan
2546259a64 DependencyChecker with tests (#7268)
- [x] Introduce DependencyChecker which can determine if any dependencies have been modified.
- [x] Move the DartDependencyBuilder into a separate file.
- [x] Add unit tests for DartDependencyBuilder.
- [x] Add unit tets for DependencyChecker

Part of #7014
2016-12-15 15:05:15 -08:00
Devon Carew
1d4292f750 filter message about front_end (#7001) 2016-11-23 09:14:46 -08:00
Ian Hickson
fd5a08941e Clarify pub.dart messages (#6856) 2016-11-14 16:54:24 -08:00
Dan Rubel
e384c0d982 Refactor flutter command exit code - part 2 (#6817)
* convert pubGet to throw ToolExit on non-zero exit code
* convert commandValidator to throw ToolExit for non-zero exit code
* convert flutter commands to throw ToolExit for non-zero exit code
* use convenience method throwToolExit
* only show "if this problem persists" for unusual exceptions
2016-11-13 22:09:03 -05:00
Ian Hickson
f75e6074a8 Minor stylistic cleanup in flutter_tools/lib/src/dart/summary.dart (#6788)
I was in here trying to figure out why we rebuild sky_services (the
answer is, because we rebuild every package we've ever downloaded, but
that's not really a problem for new users so whatever), and while I
was here I did some cleanup.
2016-11-09 18:10:40 -08:00
Devon Carew
fcfb2a5c55 Better progress (#6677)
* make showElapsedTime default to true

* support nested progresses

* improve hot reload message

* rethrow
2016-11-03 13:28:17 -07:00
Adam Barth
67f591000f Mentions flutter packages get rather than pub get (#6625)
Fixes #6417
2016-11-01 13:27:06 -07:00
Adam Barth
70eb4929af Stop downloading sky_services and flutter_services (#6583)
These aren't needed anymore.
2016-10-28 16:25:05 -07:00
Phil Quitslund
639ba0ddcb Bump Dart SDK to latest (1.21.0-dev.2.0). (#6541) 2016-10-28 17:56:55 +02:00
Phil Quitslund
57044c2a63 Bump to Dart SDK 1.21.0-dev.0.0. (#6372)
Bump to latest Dart SDK dev build (`1.21.0-dev.0.0`).

* updates to analyzer w/ support for bazel workspaces
* removes deprecated analysis `cacheSize` variable access
2016-10-18 13:38:13 -07:00
Phil Quitslund
e44f6fe478 Bump Dart SDK to 1.20.0-dev.10.0. (#6212)
* Bump Dart SDK to `1.20.0-dev.10.0`.

`1.20.0-dev.10.0` corresponds to `1.20-RC0`.

* pubspec.lock cleanup

* check for pubspec.lock existence

* cleaned up conditional remove
2016-10-05 09:05:15 -07:00
Devon Carew
fa52b456ec set the FLUTTER_ROOT env var when invoking pub (#6041) 2016-09-25 19:30:44 -07:00
Devon Carew
8755e569ca suppress pub override warning; decouple the analyzer versions (#5991)
* suppress warning; decouple the analyzer versions

* also pass in --no-packages-dir
2016-09-22 07:40:38 -07:00
James Robinson
a95c9fdb58 Isolate imports of generated Dart code from generated path (#5960)
This rewrites imports of various mojom.dart files from the Flutter
engine repo to instead import normal-looking dart files from the
(new) flutter_services package. This package handles exporting the
correct symbols from generated code wherever that may live.

Includes an engine roll to 3551e7a48e2e336777b15c7637af92fd7605b6c5
which contains the new flutter_services package.
2016-09-21 14:00:29 -07:00
Phil Quitslund
2d4d171338 Roll to Dart SDK 1.20.0-dev.5.0. (#5911)
* Roll to Dart SDK `1.20.0-dev.5.0`.

* bumps to `1.20.0-dev.5.0`.
* updates `analyzer` API use.

* Add explicit types.
2016-09-16 16:30:34 -07:00
Konstantin Scheglov
0774a6748e Build unlinked summaries for packages on upgrade. (#5816)
* Build unlinked summaries for packages on upgrade.

* Iterate through the packages in folders.

* Rollback the debug change.
2016-09-12 13:58:32 -07:00
Phil Quitslund
d2fda677e1 Update to Dart 1.20.0-dev.1.0. (#5689)
* Udpate to Dart `1.20.0-dev.1.0`.

Udpate to Dart `1.20.0-dev.1.0` and corresponding `analyzer` package.

* Added `--no-packages-dir`.

* Revert extension to master.

* Added ignores.

* Review nits.

* More nits.
2016-09-08 13:14:08 -07:00
Konstantin Scheglov
d3fd8ddd6f Build sky_engine Dart SDK summary bundle on FlutterEngine.download(). (#5460) 2016-08-17 13:01:19 -07:00
Konstantin Scheglov
ade895de4a Revert "Build sky_engine Dart SDK summary bundle on FlutterEngine.download()." (#5455) 2016-08-17 09:17:59 -07:00
Konstantin Scheglov
a8369413e4 Build sky_engine Dart SDK summary bundle on FlutterEngine.download(). (#5426)
* Build sky_engine Dart SDK summary bundle on FlutterEngine.download().

* Tweaks for Devon comments.

* Tweaks for Phil comments.
2016-08-16 21:26:07 -07:00
Phil Quitslund
0fe82c3a6f Update Dart SDK to 1.19.0-dev.4.0. (#5329) 2016-08-10 16:21:58 -07:00
Devon Carew
14483586e0 make flutter run work with a pre-built apk (#5307)
* make flutter run work with a pre-built apk

* refactor to remove the buildDir param
2016-08-09 14:38:13 -07:00
Ian Hickson
69d78325ec Licenses (#4984)
This makes the about page show the licenses of all the Dart packages that a Flutter app uses.

Issues that this does not yet resolve:
- I'm still working on getting the full list of licenses for the sky_engine package.
- Some of the licenses don't print very readably.
- There's no scrollbar on the license page.

I'll provide fixes for the first two in the coming days, but this should unblock anyone who is wanting to see something here, even if it's not quite complete. :-)

----

The patch makes the following changes: 

- The license registry is now asynchronous, since the data comes from disk.
- I moved the default license collector from the foundation package to the services package since it uses the default asset bundle now.
- The FLX builder now includes the LICENSE files of each Dart package mentioned in the `.packages` file.
2016-07-21 09:09:48 -07:00
pq
1cad4f4705 Fallback to a standard SDK if no embedders are found. 2016-06-22 19:30:46 -07:00
pq
352e2f573b Update to latest analyzer (0.27.4-alpha.14) and misc. analysis fixes.
* brings in analyzer version (`0.27.4-alpha.14`) corresponding to current Dart SDK (`1.18.0-dev.2.0`).
* updates analysis to use prefered API for embedder URI resolution
* adds trampolines to `State` and `StatelessWidget` to allow for warning-free within-library @protected access (needed since we closed off access to @protected closures from outside subclasses).
* turns off cache dependency tracking for analysis (in DDC this amounted to a 10% speed improvement).
2016-06-22 14:34:30 -07:00
Devon Carew
3ba17136b7 add a restart command to the daemon protocol (#4385)
* refactor the --resident run option into a separate file

* update daemon to run --resident apps

* re-plumbing daemon start

* send app logs

* update tests

* review changes

* fix test runner

* remove PackageMap.createGlobalInstance; rely on the ctor

* review comments
2016-06-07 12:13:35 -07:00
Devon Carew
1ae0a76cf9 warn when flutter doesn't match the pubspec version (#4109) 2016-05-23 12:23:05 -07:00
pq
2a9d2b5f30 Fix analyzer field overrides.
Cleans up 3 of the 4 violations of the `overriden_field` lint.

The last one is more interesting and I'll defer to someone closer to that code:

    [lint] Do not override fields. (packages/flutter/test/rendering/rendering_tester.dart, line 91, col 14)
2016-05-19 13:12:04 -07:00
pq
97ba6a1e0b Re-enable implementation_imports lint rule. 2016-05-17 11:02:10 -07:00
pq
fddab5d800 Back out SDK summaries.
Net-net: SDK summaries are not safe in the presence of SDK library embedders.

Context (and bug to track re-enablement) here: https://github.com/dart-lang/sdk/issues/26467.
2016-05-16 15:57:45 -07:00
Jason Simmons
32846de9f8 Remove ArtifactStore and move flutterRoot into Cache (#3883) 2016-05-12 15:54:35 -07:00
Devon Carew
826936cd33 use vendored dart sdk; check the expected version of flutter (#3831)
* use vendored dart sdk; check the expected version of flutter

* search up directories looking for the flutter root
2016-05-10 16:21:30 -07:00
pq
a8f96de47d Removed unused import. 2016-05-10 14:37:39 -07:00
pq
d11651d293 Turn on SDK summaries in flutter analyze.
The latest dev build has stable summaries so we should start using them.

(Also ensures that analysis options are propogating to the SDK analysis context --- see:  https://github.com/dart-lang/sdk/issues/26129.)
2016-05-10 14:31:00 -07:00
pq
18d971d492 Remove gratuitous pub resolver from flutter analysis.
Package mapping is already done by the `PackageDependencyTracker` so this extra check is at best not needed.  (At worst could cause an unneeded and costly call to `pub list-package-dirs`!)
2016-05-09 12:21:18 -07:00
pq
1e50745df3 Constructor ordering. 2016-05-09 11:33:52 -07:00
pq
46d32794f9 Analyze update to use in-memory package map.
Updates the analyze command to pass a package map to analysis rather than a file path.

This allows us to avoid creating a needless temporary `.packages` file and host directory and saves us a trip to disk to retrieve the contents when building our URI resolvers for analysis.
2016-05-09 09:59:16 -07:00
pq
c973629ed7 Fixed braces. 2016-05-06 13:43:21 -07:00
pq
96de7c4dcc Fix analyzer error messages.
Will have the result of restoring `[static warning]` to `[warning]`, etc.

(This is essentially how we handle it in the analyzer CLI.)
2016-05-06 13:39:48 -07:00
pq
a59a713f75 Analysis re-work to use analyzer APIs.
Introduces a new Dart analysis wrapper that works directly with the analyzer API (in favor of shelling out to a separate process).

Some consequences:

  * we no longer need to fear parts (simplifying our dart file gathering)
  * we can filter by error code (when needed), rather than by error strings
  * no more IO scraping
  * no need to generate `main()` or to run with `--package-warnings`
  * we now specify an analyzer (and linter) version in the pubspec (we’ll want to make sure this doesn’t diverge too far from the analyzer shipped with the SDK but it does give us some room to play with experimental builds)
  * no more (re)scanning of error source files (and so no more source cache)
  * should generally be a bit simpler and easier to maintain
  * runs a bit faster :)
2016-05-05 12:08:58 -07:00
Devon Carew
c00d61f6ec have flutter precache print if there's no work to do (#3213)
* have flutter precache print if there's no work to do

* tweak precache
2016-04-08 10:25:30 -07:00
Adam Barth
dd5831cb36 Run pub get if flutter_tools.stamp changes (#3206)
This will help folks run pub get after they upgrade their flutter.git
revision.
2016-04-08 07:19:25 -07:00
Devon Carew
34a67329fd use --no-precompile (#3175)
* use --no-precompile

* use the flutter bin cache's sdk
2016-04-07 11:06:38 -07:00
Devon Carew
fe37825fd5 run pub with --no-package-symlinks 2016-03-29 19:02:14 -07:00
Hixie
8950d3ccc4 Make flutter analyze useful for package conflicts
Also, resolve our package conflict, since reflectable has been fixed.
2016-03-09 17:41:05 -08:00
Devon Carew
52efc7fb68 implement --watch for flutter analyze 2016-03-07 13:46:42 -08:00
Adam Barth
357fbf8a42 Move update_packages.dart to flutter update-packages
Now that we don't require the Dart SDK to be in your path, it's hard to run
./dev/update_packages.dart. Instead, you can now run `flutter update-packages`.

Fixes #1906
2016-02-25 16:27:56 -08:00
Devon Carew
bc8e560779 run flutter doctor as part of create 2016-02-24 19:07:19 -08:00
Devon Carew
d5a6fceee5 add a summary option to the doctor class 2016-02-17 09:33:45 -08:00
Adam Barth
cf8116368d flutter run should run pub get automatically
This removes a step that can cause trouble.

Fixes #1904
2016-02-16 11:16:34 -08:00