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: add melos get command #798

Open
1 task done
ricardodalarme opened this issue Dec 4, 2024 · 3 comments
Open
1 task done

request: add melos get command #798

ricardodalarme opened this issue Dec 4, 2024 · 3 comments

Comments

@ricardodalarme
Copy link

ricardodalarme commented Dec 4, 2024

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

melos get

Description

This request is to add a melos get command that specifically and exclusively fetches the dependencies (flutter pub get) for all modules in the workspace.

Reasoning

This would streamline dependency management in cases where a user simply wants to update their dependencies without the overhead of other tasks that melos bootstrap handles.

Additional context and comments

Currently, the melos bootstrap command already runs flutter pub get across all modules in a Melos workspace. However, it also performs additional tasks, such as linking packages and running hooks, which might not always be needed.

@spydon
Copy link
Collaborator

spydon commented Dec 4, 2024

Can't you just add a Melos script named get? We don't want to replicate all of the pub commands inside of Melos.

@ricardodalarme
Copy link
Author

Huum nice question @spydon. I will give you three points to bear in mind:

  1. Melos already have other pub commands: analyze, clean and format
  2. The get command is one of the most used commands for sure
  3. melos bootstrap is way much faster than using a melos get like command

melos get

Benchmark 1: melos get
  Time (mean ± σ):      7.941 s ±  0.929 s    [User: 7.262 s, System: 1.646 s]
  Range (min … max):    7.183 s …  9.706 s    10 runs

melos bootstrap

Benchmark 1: melos bootstrap
  Time (mean ± σ):      3.847 s ±  0.304 s    [User: 10.561 s, System: 2.291 s]
  Range (min … max):    3.635 s …  4.563 s    10 runs

@spydon
Copy link
Collaborator

spydon commented Dec 5, 2024

  1. That's a good point, we're already way down that path.

  2. What level of parallelization did you use for the script?

Bootstrap is going away as soon as the Dart Workspaces feature is implemented.

If you'd like to work on a get command for melos I can assign you to this issue. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants