Commit Graph

60 Commits

Author SHA1 Message Date
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
Jonah Williams
25a813110d
[flutter_tools] reload dart_sdk when sources update (#51067) 2020-02-20 12:26:47 -08:00
Jacob MacDonald
11589ca20d
serve the generated main.dart file so source_maps work for it (#50976) 2020-02-18 12:36:03 -08:00
Jonah Williams
3bb4ba61bd
[flutter_tools] use uri resolution for asset requests (#50844) 2020-02-14 21:46:03 -08:00
Jonah Williams
ea4d969ecc
[flutter_tools] move dwds imports to not require g3 visibility (#50823) 2020-02-14 14:56:03 -08:00
Jonah Williams
d3a41816d1
[flutter_tools] ensure all source maps load correctly for release and profile (#50702) 2020-02-13 10:01:04 -08:00
Jonah Williams
18f38cd45b
Switch flutter_tools to use frontend_server for web compilation (#50365) 2020-02-11 15:43:46 -08:00
Jonah Williams
64b82f50ad
[flutter_tools][web] serve dummy service_worker and manifest file in run mode (#50115) 2020-02-04 14:19:26 -08:00
Jonah Williams
ace2c2297f
[flutter_tools] Generate correct entrypoint module name for experimental web compiler (#49486) 2020-01-27 17:41:29 -08:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Jonah Williams
e340c19905 [flutter_tools] resolve host address in the flutter tool for web server (#48992) 2020-01-21 08:58:01 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00