Skip to content

Plugin discovery does not support Dart pub workspaces #29

Description

@madalindk

flutter-tvos --version: 1.3.1 (Flutter 3.44.2, Dart 3.12.1) macOS: 15 (Sequoia) Xcode: 16.2

Steps to reproduce

  1. Set up a Dart workspace with multiple packages (using resolution: workspace in pubspec.yaml, as supported since Dart 3.6)
  2. One of the workspace member packages is a tvOS app with plugin dependencies
  3. Run dart pub get at the workspace root
  4. Run flutter-tvos build tvos from the app directory

Expected behaviour
Plugins are discovered and registered normally.

Actual behaviour
The build completes with no errors, but produces a binary with no plugins registered. No warning is printed.

Possible root cause
_walkPluginDependencies in lib/tvos_plugins.dart reads package_config.json from project.directory/.dart_tool/:

final File packageConfigFile = project.directory
    .childDirectory('.dart_tool')
    .childFile('package_config.json');

In a Dart workspace, dart pub get only writes package_config.json and package_graph.json at the workspace root's .dart_tool. Member packages instead get workspace_ref.json, which points back to the root. Upstream Flutter's findPackageConfig follows this reference automatically, but flutter-tvos does its own file reads and doesn't know about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions