Commit graph

71 commits

Author SHA1 Message Date
Jenn Magder 66768f8c5b
Remove mocks from web devices test (#77968) 2021-03-11 19:55:02 -08:00
Michael Goderbauer cb867bbedc
Enable unnecessary_await_in_return lint (#77434) 2021-03-05 18:38:15 -08:00
Sam Rawlins e8d52be500
Remove "unnecessary" imports in flutter_tools tests (#75012) 2021-02-09 09:46:07 -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 32db0fe791
[flutter_tools] provide correct sources and metadata for different base hrefs (#74452) 2021-01-21 23:04:03 -08:00
Jonah Williams 68d8c4b3bb
[flutter_tools] open chrome to correct base URL (#73962) 2021-01-14 12:16:32 -08:00
Jonah Williams 9e5c8771d4
[flutter_tools] wire up native-null-assertions for flutter web (#71618) 2020-12-03 08:59:31 -08:00
Jonah Williams a76289bb1b
[flutter_tools] run web unit tests in sound null safety (#70799) 2020-11-19 16:49:05 -08:00
Jonah Williams 0a73ecf6df
[flutter_tools] use initially parsed package config for language version, sound mode determination (#70323) 2020-11-13 09:41:11 -08:00
Jonah Williams 39bc68b6a2
[flutter_tools] dont use autodetect enum for web (#70189) 2020-11-10 12:49:38 -08:00
Yegor 879466eac2
default to unsound nullability for web (#70120) 2020-11-09 13:49:02 -08:00
Jonah Williams a0860f6e87
[flutter_tools] retry sever socket setup (and port selection if port is unspecified) (#69351)
Fixes #69348

If the web development server fails to bind, then retry up to 5 times. If a port was not provided, select a new free port each time.
2020-10-29 20:07:34 -07:00
Angjie Li 3056f4194a
Fix issue with --web-renderer. (#69319) 2020-10-29 14:43:06 -07:00
Angjie Li 2bbd004682
Support --web-renderer options which would allow user to specify which rendering backend to use. (#68848) 2020-10-28 17:32:09 -07:00
Jonah Williams 0f28edac65
[flutter_tools] null safety mode is used for dill naming (#68898)
* [flutter_tools] null safety mode is used for dill naming

* add bad test case
2020-10-23 15:39:58 -07:00
Yegor ea3b08f333
Respond to HTTP POST requests with 404 in WebAssetServer (#68492)
* Respond to POST with 404 in WebAssetServer
2020-10-19 16:21:39 -07:00
Mouad Debbar b42e34690a
[web] Update index.html template to support new path strategy (#67081) 2020-10-02 15:12:04 -07:00
Mouad Debbar 5d6321b509
[web] Respond with 404 to non-found asset or package files (#67088) 2020-10-02 11:02:03 -07:00
Jonah Williams e819f292b3
[flutter_tools] do not require a dependency on devtools server (#66842)
Re-arrange the implementation of the devtools launcher so that google3 is not required to depend on any devtools packages. Also renames the build_runner folders to isolated to better clarify their intention.
2020-09-29 18:15:56 -07:00
Mouad Debbar 31254fbe03
[web] Change the web server to support path url strategy (#66606) 2020-09-25 15:42:03 -07:00
Jonah Williams 943b41bd61
[flutter_tools] allow device classes to provide platform-specific interface for devFS Sync (#66266) 2020-09-22 16:57:04 -07:00
Balvinder Singh Gambhir 3dde3e034c
[flutter_tools] generates version.json for web using flutter tool (#64644)
Generates version.json in web directory of project. version.json can be used in the future version of package_info which will support web. version.json has the following keys : app_name, version and build_number. This file is generated every time a user runs or builds the project.

Co-authored-by: Jonah Williams <jonahwilliams@google.com>
2020-09-15 11:21:54 -07:00
Jaime Blasco 0699c18e99
[flutter_tool] [web] Remove x-frame-options header during debug (#62115)
Currently flutter run -d web creates a server with the x-frame-options: SAMEORIGIN added by default (shelf add it's by default). This doesn't allow you to use it inside a frame.

I am trying to build an embedded simulator in vscode and it requires using an iframe.

With this PR I remove the header for debug and profile mode.
2020-09-03 13:33:39 -07:00
Jonah Williams 69fd5c50a2
[flutter_tools] null assertions off by default for web (#64186)
Like Android/iOS, only enable --null-assertions if asked. Previously this was enabled by default for web, but in general this has proved to be too breaking to enable by default.

#61042
2020-08-19 14:52:47 -07:00
Danny Tuppeny f8135add8e
Add a flag for using WS for debug backend (#61359) 2020-07-13 13:31:04 -07:00
Anna Gringauze 9cbe1dccf3
Added web compiler debug metadata (#61265)
Made flutter tools serve metadata produced by the frontend server:

pass --experimental-emit-metadata flag to flutter engine
store and serve metadata from web asset server
store and serve merged metadata from web asset server
add tests to verify that metadata is served from memory
update dwds version so it can read metadata
configure dwds to read metadata from file
Prerequisite changes (landed):

sdk: https://dart-review.googlesource.com/c/sdk/+/150181
flutter engine: flutter/engine#19168
webdev:dart-lang/webdev#1064
2020-07-10 16:36:43 -07:00
Jonah Williams ae9ac9f211
[flutter_tools] support starting in canvaskit with FLUTTER_WEB_USE_SKIA=true (#60708) 2020-07-01 22:53:03 -07:00
Jonah Williams 7ca324ac01
[flutter_tools] support sound null-safety mode for the web (#60570)
In web debug mode, infer sound null safety by default. When sound null safety is enabled, provide a separate dill and precompiled Dart SDK. Release builds do not need this setting since we run dart2js from source.

Fixes #59873
2020-06-30 12:29:42 -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 2a7ee930c3
[flutter_tools] Update WebAssetServer to avoid context, fix tests (#60224)
WebAssetServer could fail if some of the global statics it depended on were initialized in a different order. Fix this by removing globals.

Delete dwds startup test that needs to spawn a real server.
2020-06-24 16:19:49 -07:00
Jonah Williams 5d61bff294
[flutter_tools] even more test fixes (#60156)
Fix tests broken under tester
2020-06-24 10:23:59 -07:00
Danny Tuppeny 96711b00ce
Don't crash on requests for invalid package URLs (#59250) 2020-06-12 09:25:04 -07:00
Jonah Williams 3bc4a82605
[flutter_tools] avoid serving files outside of expected paths (#58653) 2020-06-04 11:53:04 -07:00
Zachary Anderson 6f0ed5e142
[flutter_tools] Restore base/platform.dart (#56410) 2020-05-06 08:15:39 -07:00
Jonah Williams 2aa9016652
[flutter_tools] ensure etag headers are ascii (#55704) 2020-04-27 15:02:15 -07:00
Jonah Williams 2f0d41b2a6
[flutter_tools] set test directory base as additional root, allow running without index.html (#55531) 2020-04-24 09:09:53 -07:00
Jonah Williams f2761b6b04
[flutter_tools] refactor Chrome launch logic to remove globals/statics (#55160) 2020-04-22 01:28:51 -07:00
Jonah Williams b7e30cfc26
[flutter_tools] update compilation to use package config (#54467) 2020-04-20 14:02:49 -07:00
Jonah Williams c141a53f9a
[flutter_tools] support any as a special web-hostname (#54715) 2020-04-15 10:55:01 -07:00
Jonah Williams 412e4dd50e
[flutter_tools] migrate devfs web to package_config (#54299) 2020-04-08 14:41:11 -07:00
Danny Tuppeny 589b14d841
Add a switch to use WebSockets for web debug proxy (#54083) 2020-04-08 09:02:03 -07:00
Jonah Williams 1e86c1fb12
[flutter_tools] re-enable debug extension (#53765) 2020-04-03 13:26:15 -07:00
Anna Gringauze 3a0d837741
Enable expression evaluation in debugger for web platform (#53595) 2020-04-02 10:26:03 -07:00
Jonah Williams 10571920c0
[flutter_tools] update to latest dwds API (#52936)
Should fix issues introduced in web-server device and allow loading org-dartlang-app URIs
2020-03-23 18:47:50 -07:00
Jonah Williams 6884086e5c
[flutter_tools] Update to latest dwds APIs (#51004)
Update to latest dwds APIs, moving back to dwds driven hot restart and enabling future work on expression evaluation.
2020-03-17 17:29:53 -07:00
Jonah Williams b3a37d0273
[flutter_tools] support toggling CanvasKit rendering on with 'k' (#52511) 2020-03-13 07:02:34 -07:00
Jonah Williams 60d0fef17a
[flutter_tools] move stack_trace_mapper and require.js into memory file system (#52276) 2020-03-09 22:07:34 -07:00
Jonah Williams bbf913bc4c
[flutter_tools] resolve requests to web directory in debug mode (#51995) 2020-03-05 12:34:03 -08:00
Ben Konyi 3edd3eb4a2
Updated package:test, package:test_core, package:coverage, package:package_config (#51946)
This is required to roll forward package:vm_service to 3.0.0 and is
blocking a DevTools release.
2020-03-04 11:40:52 -08:00
Jonah Williams bb74a328b5
[flutter_tools] adds etag/cache control header to debug asset server (#51143) 2020-02-21 14:15:54 -08:00