Skip to content

Support using flutter-dev as the Flutter entrypoint script #5651

Closed

Description

@bkonyi

flutter-dev is a version of flutter used by developers working on flutter_tools that runs the tool from source instead of precompiling the tool as a snapshot on first run and using the precompiled snapshot for subsequent runs.

Dart-Code should provide support for using flutter-dev to reduce some friction for flutter_tools developers.

From some local experimentation where I renamed flutter-dev to flutter and updated bin/internal/shared.sh to not try to build a snapshot for flutter instead of flutter-dev, it looks like Dart-Code does make use of the existence of bin/cache/flutter_tools.snapshot to determine if the tool is initialized:

[11:06:55 AM] [General] [Info] Searching for SDKs...
[11:06:55 AM] [General] [Info] Environment PATH:
[11:06:55 AM] [General] [Info]     /usr/bin
[11:06:55 AM] [General] [Info]     /bin
[11:06:55 AM] [General] [Info]     /usr/sbin
[11:06:55 AM] [General] [Info]     /sbin
[11:06:55 AM] [General] [Info] Took 36ms to search for 1 projects (5 levels)
[11:06:55 AM] [General] [Info]     Found projects:
[11:06:55 AM] [General] [Info]         /Users/bkonyi/samples/veggieseasons
[11:06:55 AM] [General] [Info] Took 3ms to filter out excluded projects (0 exclusion rules). 1 projects remain.
[11:06:55 AM] [General] [Info] Found Flutter project at /Users/bkonyi/samples/veggieseasons (Pubspec? true, Mobile? true, Create Trigger? false, Flutter Repo? false)
[11:06:55 AM] [General] [Info] Searching for flutter
[11:06:55 AM] [General] [Info]     Looking for flutter in:
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter -> /Users/bkonyi/flutter/bin
[11:06:55 AM] [General] [Info]         /Users/bkonyi/samples/veggieseasons
[11:06:55 AM] [General] [Info]         /Users/bkonyi/samples/veggieseasons -> /Users/bkonyi/samples/veggieseasons/bin
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter/bin/
[11:06:55 AM] [General] [Info]         /Users/bkonyi/samples/veggieseasons/.flutter
[11:06:55 AM] [General] [Info]         /Users/bkonyi/samples/veggieseasons/.flutter -> /Users/bkonyi/samples/veggieseasons/.flutter/bin
[11:06:55 AM] [General] [Info]         /Users/bkonyi/samples/veggieseasons/vendor/flutter
[11:06:55 AM] [General] [Info]         /Users/bkonyi/samples/veggieseasons/vendor/flutter -> /Users/bkonyi/samples/veggieseasons/vendor/flutter/bin
[11:06:55 AM] [General] [Info]         /usr/bin
[11:06:55 AM] [General] [Info]         /bin
[11:06:55 AM] [General] [Info]         /usr/sbin
[11:06:55 AM] [General] [Info]         /sbin
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter-sdk
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter-sdk -> /Users/bkonyi/flutter-sdk/bin
[11:06:55 AM] [General] [Info]     Found at:
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter -> /Users/bkonyi/flutter/bin
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter/bin/
[11:06:55 AM] [General] [Info]     Candidate paths to be post-filtered:
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter
[11:06:55 AM] [General] [Info]         /Users/bkonyi/flutter/bin/ -> /Users/bkonyi/flutter
[11:06:55 AM] [General] [Info]     Found at /Users/bkonyi/flutter
[11:06:55 AM] [General] [Info]     Returning SDK path /Users/bkonyi/flutter for flutter
[11:06:55 AM] [General] [Info] Flutter is not initialized, running 'flutter doctor' to force...
[11:06:55 AM] [General] [Info] (PROC 16968) Logging data for process...
[11:06:55 AM] [General] [Info] (PROC 16968) Could not find a command named "/Users/bkonyi/flutter/bin/cache/flutter_tools.snapshot".

Usage: dart [vm-options] <command|dart-file> [arguments]

Global options:
-v, --verbose               Show additional command output.
    --version               Print the Dart SDK version.
    --enable-analytics      Enable analytics.
    --disable-analytics     Disable analytics.
    --diagnostics           Show tool diagnostic output.
    --suppress-analytics    Disallow analytics for this `dart *` run without changing the analytics configuration.
-h, --help                  Print this usage information.

Available commands:

Project
  build                 Build a Dart application including native assets.
  compile               Compile Dart to various formats.
  create               …
[11:06:55 AM] [General] [Info] (PROC 16968) exited (64, null)

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Aug 13, 2025
  2. added this to the v3.118.0 milestone on Aug 13, 2025
  3. added a commit that references this issue on Aug 13, 2025
  4. DanTup commented on Aug 13, 2025

    @DanTup
    Member

    @bkonyi not sure why that didn't work, there's definitely no mention of "flutter_tools" in Dart-Code that should expect a snapshot.

    But anyway, I included a setting for this in todays pre-release (v3.117.20250813 - it might take 20-30 mins to show up):

    Image

    I have only done some basic testing of it, so I cannot promise it works perfectly, but it's there for you to try. If you find issues with it, please open issues and we can look at fixing (and in the meantime you may just need to leave it off).

  5. added a commit that references this issue on Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    flutter-devexp-teamin flutterRelates to running Flutter appsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions