Skip to content

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

@bkonyi

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions