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

request: filter for supported platforms from pubspec #601

Open
1 task done
benthillerkus opened this issue Nov 20, 2023 · 1 comment
Open
1 task done

request: filter for supported platforms from pubspec #601

benthillerkus opened this issue Nov 20, 2023 · 1 comment
Labels
feature request Needs: Triage The issue needs triaging

Comments

@benthillerkus
Copy link

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

melos exec --supports-platform=""

Description

As a developer, I want to run melos scripts only on a subset of packages, maybe because I'm on a certain platform, or only want to test for a certain platform.

The way to support that would be through Melos filtering ability.

The --supports-platform filter would filter for packages that support the current platform melos is being invoked on.
Additionally you can specify the platforms you require via a list like so: --supports-platform="macos, linux".

Which platform a package supports would be based on the platforms: field in pubspec.yaml. If the field is not set, it is assumed that the package supports all platforms.

Reasoning

In CI I want to run all tests on Linux, besides ones on packages that don't support Linux (or in my case specifically only support macos)

Additional context and comments

No response

@benthillerkus benthillerkus added feature request Needs: Triage The issue needs triaging labels Nov 20, 2023
@Salakar
Copy link
Member

Salakar commented Nov 30, 2023

Flutter packages have a named platform folder convention already so you can already do this via --dir-exists, e.g.

melos list --dir-exists="macos" --dir-exists="linux"

This is what we do on the FlutterFire repository to filter platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Needs: Triage The issue needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants