Uh oh!
There was an error while loading. Please reload this page.
[flutter_tools] Add support for vmServiceFileInfo when attaching - #128503
Conversation
487e8d5 to
381c6f2CompareWhen building the new SDK DAPs, this functionality was missed from the Flutter adapter (but added to the Dart CLI adapter). As well as passing a VM Service URI directly, we support passing a file that can be polled for it. This uses the same mechanism we use to obtain the VM Service URI from a Dart debug session (we run "dart --write-service-info=foo.json my_file.dart" and then poll that file) and is useful for users that have their own mechanism for launching an app (for example using custom Flutter embedders - see Dart-Code/Dart-Code#3353) to provide a VM Service URI once the app is up and running. FixesDart-Code/Dart-Code#4577.
381c6f2 to
e4ef0bcCompare3c02364 to
62534fbCompare| - `String? vmServiceUri` - the VM Service URI to attach to (if not supplied, Flutter will try to discover it from the device) | ||
| - `String vmServiceInfoFile` - the file to read the VM Service info from \* | ||
| - `String vmServiceUri` - the VM Service URI to attach to \* |
There was a problem hiding this comment.
is this now non-nullable?
There was a problem hiding this comment.
Oops, no - apparently I pasted the Dart version over this and didn't check it properly (it's wrong there, and I also lost the additional explanatory text). Fixed!
| String? vmServiceUri = args.vmServiceUri; | ||
| final String? vmServiceInfoFile = args.vmServiceInfoFile; | ||
| if (vmServiceUri != null && vmServiceInfoFile != null) { |
There was a problem hiding this comment.
What happens if they're both null? Do we try to discover it?
There was a problem hiding this comment.
Yep, I've made the error text a bit clearer (and also reintroduced this explanation in the readme noted above).
DanTup
commented
Jun 16, 2023
Out of interest - does the autosubmit bot handle review status? Like if I add the tag now, would it just blindly merge when the build is green, or wait for you to approve? 🤔 |
christopherfujino
commented
Jun 16, 2023
Unfortunately, I think it would remove the label since it's not approved. |
christopherfujino
commented
Jun 16, 2023
LGTM and added the label for you :) |
DanTup
commented
Jun 16, 2023
Ah, yes. I wonder if it's worth a feature request to just delay until it's reviewed? I think that's what Gerrit does - you can add AutoSubmit to mean "when this is approved, land it without me needing to come back and do it"
Thanks! :) |
christopherfujino
commented
Jun 16, 2023
Good idea ;) #113638 |
DanTup
commented
Jun 17, 2023
LOL! Always one step ahead 😁 |
When building the new SDK DAPs, this functionality was missed from the Flutter adapter (but added to the Dart CLI adapter).
As well as passing a VM Service URI directly, we support passing a file that can be polled for it.
This uses the same mechanism we use to obtain the VM Service URI from a Dart debug session (we run
dart --write-service-info=foo.json my_file.dartand then poll that file which the VM will write) and is useful for users that have their own mechanism for launching an app (for example using custom Flutter embedders - see Dart-Code/Dart-Code#3353) to provide a VM Service URI once the app is up and running.FixesDart-Code/Dart-Code#4577.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.