Repository navigation
Remove --disable-dart-dev across org: flutter #154268
Description
Activity
- addedc: contributor-productivityTeam-specific productivity, code health, technical debt.Team-specific productivity, code health, technical debt.P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.
on Aug 28, 2024 - added a commit that references this issue
on Aug 29, 2024 There used to be a slight performance benefit running with --disable-dart-dev when attempting to
debug since we used to launch DDS from dartdev, so providing that flag would effectively just tell
the VM to skip starting the dartdev isolate and DDS. Now that dart:_vmservice is responsible for
starting DDS, this isn't really the case anymore.Looking at https://github.com/dart-lang/sdk/blob/a0411ae24485526470b7f99148132f29fe01edcb/runtime/bin/main_impl.cc#L1419 it seems that
--disable-dart-devstill bypasses dartdev isolate from launching, which might still be relevant for flutter to avoid.There used to be a slight performance benefit running with --disable-dart-dev when attempting to
debug since we used to launch DDS from dartdev, so providing that flag would effectively just tell
the VM to skip starting the dartdev isolate and DDS. Now that dart:_vmservice is responsible for
starting DDS, this isn't really the case anymore.Looking at https://github.com/dart-lang/sdk/blob/a0411ae24485526470b7f99148132f29fe01edcb/runtime/bin/main_impl.cc#L1419 it seems that
--disable-dart-devstill bypasses dartdev isolate from launching, which might still be relevant for flutter to avoid.The DartDev isolate will only launch if a command is provided (e.g.,
dart run foo.dartinstead ofdart foo.dart) so there really won't be much performance benefit.I see, thanks Ben, but conceptually if flutter doesn't use dartdev, passing the flag still makes sense.
I see, thanks Ben, but conceptually if flutter doesn't use dartdev, passing the flag still makes sense.
Alex / Ben - My understanding from talking to Ben (but also Jonah, etc), is this flag was historically used when there was a transition from
dartbeing strictly the VM entrypoint to being a unified CLI tool, and during that transition period there being significant performance and stability benefits.If we still think those are true (either or/both), let's revert this change - otherwise if we don't think there is any real motivation to do so, I'd prefer not having flags that "used to be useful" in the codebase as they tend to get copied without understanding.
I don't think there's any significant performance or stability benefits of passing this flag anymore. Also, there's a good chance this flag goes away as Siva migrates
dartto be an AOT executable of DartDev that calls intodartvmto run code from source, so it's better to remove it.Reacted by Matan LureyI ran into one difficult case where
dev/devicelab/lib/framework/runner.dartseems load-bearing on--disable-dart-dev. I debugged it a bit with @jonahwilliams. We can reproduce the error locally by running the following (substitute your own paths):BOT=true LANG=en_US.UTF-8 /Users/matanl/Developer/flutter/bin/cache/dart-sdk/bin/dart --enable-vm-service --no-pause-isolates-on-exit bin/tasks/smoke_test_setup_failure.dart Could not start the VM service: DartDevelopmentServiceException: Failed to start Dart Development Service vm-service: Error: Unhandled exception: HttpException: HttpServer is not bound to a socket #0 _HttpServer.address (dart:_http/http_impl.dart:3327:17) #1 Server.serverAddress (dart:vmservice_io/vmservice_server.dart:259:25) #2 Server.startup (dart:vmservice_io/vmservice_server.dart:616:24) <asynchronous suspension> #3 _toggleWebServer (dart:vmservice_io:244:5) <asynchronous suspension>
I'll work on addressing this in the next PR.
- added a commit that references this issue
on Aug 29, 2024 Found the root cause, blocked on dart-lang/sdk#56606.
- addeddependency: dartDart team may need to help usDart team may need to help usblockedIssue is blocked by another issueIssue is blocked by another issue
on Aug 29, 2024 - added a commit that references this issue
on Sep 2, 2024 - added a commit that references this issue
on Sep 3, 2024 - removedblockedIssue is blocked by another issueIssue is blocked by another issue
on Sep 10, 2024 This is now unblocked and the last 2 PRs are in review.
This is now complete: https://github.com/search?q=org%3Aflutter%20%22--disable-dart-dev%22&type=code
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Sep 24, 2024
This issue is to track removing a flag that used to be important-ish, but no longer is, and is used across the Flutter codebase.
@bkonyi: