Commit graph

31 commits

Author SHA1 Message Date
Jenn Magder 8ddc27e607
Split globals.dart into null sound and unsound libraries (#79016) 2021-03-31 16:55:20 -07:00
Gary Qian 2f05751973
Record deferred components assets in AssetManifest.json (#78824) 2021-03-24 02:57:01 -07:00
Gary Qian ee41782732
[flutter_tools] Deferred components build system (#76192) 2021-03-04 18:09:02 -08:00
Jonah Williams d65c98b4a2
[flutter_tools] replace some mock file/directories with new op handle (#76268) 2021-02-17 21:26:03 -08:00
Jonah Williams 74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
Jonah Williams dbcd7868a4
[flutter_tools] remove most globals from asset system and remove Cache manipulation in unit tests (#70011) 2020-11-09 18:01:04 -08:00
Jonah Williams 741608a261
[flutter_tools] fix recursive asset variant issue (#61129)
Fixes #45075
Fixes #57210

If an asset was included directly from the project root directory, then the same asset when copied to various output or ephemeral directories would also be picked up as an asset variant. This could cause assets to be recursively copied into asset/build/ephemeral directories, as each time it would run it would pick up all of the previous "variants".

The solution is to include project ephemeral directories, in addition to the build directory.
2020-07-08 18:07:27 -07:00
Jonah Williams 82a6f9bf0b
[flutter_tools] remove most use of global packages path (#60231)
The global packages path could cause tests to fail when it would be overriden to unexpected (in test setup) values. Remove most usage and make it a configuration on buildInfo, along with most other build information. Cleanup the asset builder to require the .packages path and the resident runners to no longer require it, since they already have the information in build_info.

It needs to stick around for the fuchsia deps we do not control.

Filled #60232 for remaining work.
2020-06-25 12:52:14 -07:00
Jonah Williams 4845df906a
[flutter_tools] do not include material icon incorrectly (#58335)
If a dependency specified uses-material-design: true and the main pubspec specifies uses-material-design: false, then the MaterialIcons font would be included in the font manifest, but not in the AssetManifest or final bundle. Remove it from the FontManifest if this occurs
2020-06-01 16:30:43 -07:00
Jonah Williams d9144bf8fc
[flutter_tools] rename output LICENSE file to NOTICES and support loading either (#57871)
Work towards #16723

This is only safe to land after #58131 lands in google3. Only build NOTICES in asset manfiest, and load either LICENSE or NOTICES from pubspec dependencies.
2020-05-29 11:55:02 -07:00
Jonah Williams d0d9da832b
[flutter_tools] prevent wildcard assets from causing build invalidation issues (#56472) 2020-05-19 12:37:04 -07:00
Jonah Williams afdc440840
[flutter_tools] surface missing assets originating package (#55701) 2020-05-16 14:52:04 -07:00
Zachary Anderson 6f0ed5e142
[flutter_tools] Restore base/platform.dart (#56410) 2020-05-06 08:15:39 -07:00
Jonah Williams 6d1966efcc
[flutter_tools] make gallery hot reload 5x faster with one neat trick (#56224) 2020-05-04 11:32:30 -07:00
Jonah Williams d6cbf2591a
[flutter_tools] don't recreate license, manifest, asset if unchanged (#56107)
Avoid syncing unchanged versions of these files during hot restart/reload. This happens if the asset bundle needs to be built but produces identical manifests/licenses due to only asset contents changing
2020-05-01 12:03:31 -07:00
Alexandre Ardhuin c2ae654ddf
enable avoid_single_cascade_in_expression_statements (#51944) 2020-03-05 08:03:26 +01:00
Jonah Williams f7b8d62cbc
[flutter_tool] Refactor Logger and Terminal to (mostly) no longer depend directly on context (#47269) 2020-01-08 12:35:12 -08:00
Jonah Williams ee7a37f1d3
[flutter_tools] Ensure that global variables are easily identifiable (#47398) 2020-01-06 11:04:20 -08:00
Dan Field 24f39d40a4 Revert "Revert "Add many more global analyses. (#47875)" (#48080)" (#48081)
This reverts commit 04ea3183ce.
2020-01-02 11:47:28 -08:00
Francisco Magdaleno 04ea3183ce
Revert "Add many more global analyses. (#47875)" (#48080)
This reverts commit e768c92fbc.
2020-01-02 09:25:59 -08:00
Ian Hickson e768c92fbc
Add many more global analyses. (#47875)
* Update packages.

* Add many more global analyses.

* Catch trailing spaces and trailing newlines in all text files.
  Before we were only checking newly added files, but that means we
  missed some.

* Port the trailing spaces logic to work on Windows too.

* Correct all the files with trailing spaces and newlines.

* Refactor some of the dev/bots logic into a utils.dart library.
  Notably, the "exit" and "print" shims for testing are now usable
  from test.dart, analyze.dart, and run_command.dart.

* Add an "exitWithError" function that prints the red lines and
  then exits. This is the preferred way to exit from test.dart,
  analyze.dart, and run_command.dart.

* More consistency in the output of analyze.dart.

* Refactor analyze.dart to use the _allFiles file enumerating logic
  more widely.

* Add some double-checking logic to the _allFiles logic to catch
  cases where changes to that logic end up catching fewer files
  than expected (helps prevent future false positives).

* Add a check to prevent new binary files from being added to
  the repository. Grandfather in the binaries that we've already
  added.

* Update all the dependencies (needed because we now import crypto in
  dev/bots/analyze.dart).
2019-12-30 17:12:19 -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
Jonah Williams b54bb6abbb
Dont crash if the tool cannot delete asset directory during debugging (#45407) 2019-11-22 14:06:05 -08:00
Jonah Williams 4c677e4148
Extra defensive programming for pub modification time assert (#43315) 2019-10-22 22:05:00 -07:00
Jonah Williams 46ea99122b
Revert "Extra defensive programming for pub modification time assert (#42491)" (#43235)
This reverts commit 3597bae6a0.
2019-10-21 20:54:02 -07:00
Ian Hickson 3597bae6a0 Extra defensive programming for pub modification time assert (#42491) 2019-10-21 20:15:20 -07:00
Jonah Williams 68e768dbcf
fix type error in manifest asset bundle (#42791) 2019-10-15 15:25:33 -07:00
Jonah Williams 04e04ffa95
Deflake wildcard asset test (#42597) 2019-10-14 08:49:02 -07:00
Dan Field 3fea2838df
Skip test (#42557) 2019-10-11 16:18:00 -07:00
Ian Hickson 08643c41d7
Always fake ProcessManager when you fake Filesystem in tests (#42369)
...because otherwise, processes that think they're manipulating your
filesystem will be doing crazy things the test is ignoring, leading to
(at best) failures and (at worst) flakes or disk corruption.
2019-10-11 11:23:12 -07:00
Ian Hickson d919e694b8
Move tools tests into a general.shard directory in preparation to changing how we shard tools tests (#36108) 2019-07-13 11:51:44 -07:00
Renamed from packages/flutter_tools/test/asset_bundle_test.dart (Browse further)