Closed xsahil03x closed 6 months ago
I think just adding a flag to the bootstrap
command would make sense, like --ignore-shared-dependencies
or something like that, but other than that it sounds like a good idea.
Sure, can you also suggest some alternate names for the command? melos setSharedDependencies
is a bit long and it does not convey that it also updates the environment.
I think you misunderstood me? It shouldn't be a separate command, it should be a flag to bootstrap
.
I understood your point and it's a nice addition to the melos bs
command but, I don't want to skip it during the bs
command but to run it as a standalone command as the time-consuming part in the bs command is running pub_get
in all the packages.
As a user, my requirement is to just update the environment and common dependency in my monorepo not actually bootstrap and link all the local dependencies in the project.
Ah, I misunderstood your original request. I thought you meant that it took too long to update the common dependencies meanwhile running bootstrap.
I would still make it a flag to bootstrap
though, since it belongs to that section, so maybe --skip-linking
or --only-update-shared-dependencies
(way too long...)
A flag to bootstrap
can solve this request but then it will be against the primary function of the bootstrap
command.
As stated in the documentation -
Bootstrap Command
This command initializes the workspace, links local packages together and installs remaining package dependencies.
Bootstrapping has two primary functions:
1. Installing all package dependencies (internally using pub get).
2. Locally linking any packages together via path dependency overrides without having to edit your pubspec.yaml.
That's why my original proposal was to extract it into a separate command.
The documentation can be updated, but I don't think the use-case is common enough that we'd want to add a new command for it, especially since it is bound to bootstrap
in the config already.
I will try to come up with a PR tomorrow, Thanks
Is there an existing feature request for this?
Command
No response
Description
We are currently using the Shared Dependencies feature of the
melos bs
command to update our flutter environment and common dependencies btw our packages and it works fine but, runningbs
in a big monorepo such as ours which contains almost 300+ packages takes time to complete. It would be easier if it can be extracted as a separate melos command.I am open to implementing it and would love to hear your views on this.
Thanks for all the great work.
Reasoning
Running
melos bs
just for settingshared dependencies
takes a huge amount of time in a big monorepo.