Skip to content

fix: Detect if a package is flutter-based using SDK #755

@provokateurin

Description

@provokateurin

Is there an existing issue for this?

  • I have searched the existing issues.

Version

6.0.0

Description

Currently melos detects if a package is flutter based by checking if flutter is listed as a dependency.
This is not entirely correct, as you can have a package that does not need flutter itself (so it has no dependency specified for it, but depends on another package that uses flutter.
The correct way to detect if a package needs flutter is to check if environment.flutter is specified.

Steps to reproduce

  1. Create package A with dependency on flutter
  2. Create package B without dependency on flutter but with dependency on package A
  3. Run melos list --flutter.

Expected behavior

Both package A and B should be listed, but only A is present.

Screenshots

No response

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtype: acceptedMarks issues/pull requests that are accepted & scheduled to be worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions