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

feat: Add support for --melos #53

Closed
wants to merge 1 commit into from
Closed

Conversation

olexale
Copy link

@olexale olexale commented Mar 10, 2024

Changes proposed

With this PR I propose to add --melos and --no-melos flags which control whether spec should look for melos workspace. For backward compatibility, the default value is true.

This flag is extremely useful when a developer wants to focus on a single package development (--watch --coverage) and still be productive.


Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.

@rrousselGit
Copy link
Contributor

Could you expand on the reasoning behind this? I don't see the value quite yet

@olexale
Copy link
Author

olexale commented Mar 10, 2024

The project I'm working with has melos that controls 300+ packages, 2M+ lines of Dart code, and many tests. Running tests with plain old dart test and flutter test in all packages takes more than an hour.
Developers typically make changes in a single package at a time, but even though the changes are scoped, when using spec with --watch --coverage arguments, other packages are being tested in parallel. This makes our machines dead freeze in a few minutes.
Proposed changes make it possible to use spec on a single package that is a part of a melos workspace without processing the rest of the workspace.

@rrousselGit
Copy link
Contributor

In that case, I would rather add arguments to filter the list of packages spec runs against, instead of enabling/disabling melos.

For example spec could take a list of paths, and exclude anything else that's not in those paths

@olexale
Copy link
Author

olexale commented Mar 10, 2024

Thanks, I'll evaluate the proposed solution. Closing this PR.

@olexale olexale closed this Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants