-
Notifications
You must be signed in to change notification settings - Fork 91
Conversation
…nto domesticmouse-flutter-3.1.0-9.0.pre
…nto domesticmouse-flutter-3.1.0-9.0.pre
…com/dart-lang/dart-services into domesticmouse-flutter-3.1.0-9.0.pre
Hey @srawlins, can you give guidance on what the Web bootstrap should now be? Flutter 3.1.0-9.0.pre has broken the old bootstrap file that expected |
Do you have CLs where they've been changing what the bootstrap file is going to be generated as? The CI failures don't look super helpful, but can we get the server logs for those requests? |
There are no server logs as this hasn't been landed yet. Once this PR lands, the beta server will automatically adopt it, and start failing requests that rely on plugins. I'm guessing that means most of the Firebase packages, for starters. The before and after on the build method looks like this:
The delta between the two is too large to get GitHub to generate a visual diff. |
For the server logs, I just mean the server during the test. "Expected 200, Actual 400" isn't super helpful. So we'd have to add debugging or something to see why it's so angry. |
With just the version of the Dart SDK bumped to import 'package:flutter/material.dart';
void main() {
for (int i = 0; i < 4; i++) {
print('hello ${i}');
}
} We see the following error: Error: Error when reading '/var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadU0yzQJ/.dart_tool/package_config.json': No such file or directory
Error: Couldn't resolve the package 'flutter_web_plugins' in 'package:flutter_web_plugins/flutter_web_plugins.dart'.
/var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadU0yzQJ/lib/bootstrap.dart:2:8: Error: Not found: 'package:flutter_web_plugins/flutter_web_plugins.dart'
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
^
/var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadU0yzQJ/lib/bootstrap.dart:3:8: Error: Error when reading '/var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadU0yzQJ/lib/generated_plugin_registrant.dart': No such file or directory
import 'generated_plugin_registrant.dart';
^
/var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadU0yzQJ/lib/bootstrap.dart:7:19: Error: Undefined name 'webPluginRegistrar'.
registerPlugins(webPluginRegistrar);
^^^^^^^^^^^^^^^^^^
/var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadU0yzQJ/lib/bootstrap.dart:7:3: Error: Method not found: 'registerPlugins'.
registerPlugins(webPluginRegistrar);
^^^^^^^^^^^^^^^ With the contents of this PR, the returned error is now: /var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadHQdH4t/lib/bootstrap.dart:5:8: Error: Error when reading '/var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadHQdH4t/lib/web_plugin_registrant.dart': No such file or directory
import 'web_plugin_registrant.dart' as pluginRegistrant;
^
/var/folders/5y/4dz9m6091ms_72g3zk9pvjn4003nrc/T/dartpadHQdH4t/lib/bootstrap.dart:19:24: Error: Method not found: 'registerPlugins'.
pluginRegistrant.registerPlugins();
^^^^^^^^^^^^^^^ |
Ah that's super helpful. Well I think the command to The relevant bits that I remember, ragarding how we generate a plugin registrant file are:
|
Maybe @ditman can help out here. I'm not sure exactly what changed with flutter/flutter#102185, but our current process for running a Flutter Web app is:
I suspect that we create our own So I imagine |
Ahhh, that is no longer true, the file gets created by There was also a small change in the contents of the plugin registrant and how it's generated that might explain the errors that @domesticmouse is seeing: So when there are no plugins we generate a file that has just a noop And when there ARE plugins, we assume we can fallback to the webPluginRegistrar, but the default entrypoint always calls this as This is the new bootstrap code: Note that the bootstrap just defines the So I guess, your flutter "bootstrap.dart" here needs to be rewritten around The plugin registrant seems harder, I guess you guys don't want to |
My understanding is that with DDC we can do a chunk of work upfront (e.g. compiling Flutter and Dart SDK to JS) and then have a quick per-request compilation. We want to be able to compile flutter code in sub second timeframes to prevent blowing out the number of serving machines we need. It's also nice for users to have as quick as possible response to the compile-and-run button. Moving from DDC to full compilation would be a major undertaking, invalidating several pieces of our infrastructure, and unlikely to be doable before the next stable release. |
So, we should restore the We could put it somewhere in .dart_tool for you to move around as needed? The goal of the change above was to not create it the users' working copy (inside |
Created this issue: flutter/flutter#106765 /cc @yjbanov |
This works for me! |
A fix for the generation of the web plugin_registrant on |
I'll close this PR, and create a new PR once the new |
@domesticmouse the generation of the flutter plugin registrant on Apologies for the delay, my CP request was skipped in favor of the normal beta flow. |
No description provided.