Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
provokateurin opened this issue Sep 12, 2024 · 3 comments
Open
1 task done

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

provokateurin opened this issue Sep 12, 2024 · 3 comments
Labels
bug Something isn't working Type: Accepted

Comments

@provokateurin
Copy link

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

@provokateurin provokateurin added the bug Something isn't working label Sep 12, 2024
@spydon
Copy link
Collaborator

spydon commented Sep 12, 2024

Good catch, would you like to work on a PR for this?

@provokateurin
Copy link
Author

Sure, I'll give it a try.

@provokateurin
Copy link
Author

provokateurin commented Sep 12, 2024

Hm it seems I might be wrong, as it is also possible to not have the flutter SDK specified.
Only the pubspec.lock always indicates if flutter is used or not (under the environment key).

This is a bit more complex than I anticipated, so I don't think I have the time to fix this myself given that I have no knowledge of the melos internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Type: Accepted
Projects
None yet
Development

No branches or pull requests

2 participants