You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a setting to completely disable using pub (no prompts, no automatic running, no commands/toolbar buttons) #5213
Is your feature request related to a problem? Please describe.
I've started using Melos to manage my monorepos, but realized that running flutter pub get in all of the packages works, but doesn't trigger my post-boostrap hooks, nor does it link the packages. This makes the button useless.
Describe the solution you'd like
If a workspace root contains a melos.yaml, offer to run melos bootstrap as opposed to flutter pub get/dart pub get.
Describe alternatives you've considered
Allow turning off the button (ideally automatically, but manually works too)
Building in support for each tool like Melos is unfortunately not very scalable. There are a growing number of tools with different requirements (for ex. there have been many requests for package managers like FVM, Puro, ASDF) and implementing them all and keeping them updated would add a lot of work here.
If there's demand for something like this that could be implemented in a generic way (that other similar tools can use), I think that would be a more reasonable solution. Otherwise, I think a setting to disable Pub for a workspace (which could hide all commands and buttons and disable any automatic running of this) is also a fair request.
Building in support for each tool like Melos is unfortunately not very scalable. There are a growing number of tools with different requirements (for ex. there have been many requests for package managers like FVM, Puro, ASDF) and implementing them all and keeping them updated would add a lot of work here.
If there's demand for something like this that could be implemented in a generic way (that other similar tools can use), I think that would be a more reasonable solution.
Yeah, I expected that. Thanks for thinking it though.
I think it'd make sense for some sort of extension point, but it does feel niche, and when/if Melos adopts pub workspaces it shouldn't be needed.
Otherwise, I think a setting to disable Pub for a workspace (which could hide all commands and buttons and disable any automatic running of this) is also a fair request.
That would suite my purposes fine as well! I just have some colleagues I'm ~onboarding to Flutter, and it's tripping them up. Turning it off would help.
changed the title [-]Native `melos bootstrap` support[/-][+]Add a setting to completely disable using `pub` (no prompts, no automatic running, no commands/toolbar buttons)[/+]on Aug 7, 2024
Ok, I've renamed this to be a request for a setting that just disables all of the pub stuff. With this setting, you could commit it into .vscode/settings.json for a project and nobody would see any of the pub interaction dialogs/buttons with it.
when/if Melos adopts pub workspaces it shouldn't be needed.
I'm not familiar with Melos, but can you explain why it wouldn't be needed with Pub workspaces? Do the hooks become redundant in Pub Workspaces, or is there some mechanism for running them that I haven't seen?
Ok, I've renamed this to be a request for a setting that just disables all of the pub stuff. With this setting, you could commit it into .vscode/settings.json for a project and nobody would see any of the pub interaction dialogs/buttons with it.
Yup, that'd work great.
I'm not familiar with Melos, but can you explain why it wouldn't be needed with Pub workspaces? Do the hooks become redundant in Pub Workspaces, or is there some mechanism for running them that I haven't seen?
While the post-boostrap hooks wouldn't be run, it'd delegate the resolution to pub, so bootstrapping would be done fully by pub. You could run codegen, etc, separately. It essentially becomes a fancy task runner wrapping pub.
Activity
DanTup commentedon Aug 5, 2024
Building in support for each tool like Melos is unfortunately not very scalable. There are a growing number of tools with different requirements (for ex. there have been many requests for package managers like FVM, Puro, ASDF) and implementing them all and keeping them updated would add a lot of work here.
If there's demand for something like this that could be implemented in a generic way (that other similar tools can use), I think that would be a more reasonable solution. Otherwise, I think a setting to disable Pub for a workspace (which could hide all commands and buttons and disable any automatic running of this) is also a fair request.
Btw, it seems Melos does have its own extension (https://melos.invertase.dev/ide-support#vs-code) but I don't know if it helps with what you're after.
lishaduck commentedon Aug 6, 2024
Yeah, I expected that. Thanks for thinking it though.
I think it'd make sense for some sort of extension point, but it does feel niche, and when/if Melos adopts pub workspaces it shouldn't be needed.
That would suite my purposes fine as well! I just have some colleagues I'm ~onboarding to Flutter, and it's tripping them up. Turning it off would help.
Yeah, it does what's needed, it's just that the dialogs and such from the Dart extension are annoying.
[-]Native `melos bootstrap` support[/-][+]Add a setting to completely disable using `pub` (no prompts, no automatic running, no commands/toolbar buttons)[/+]DanTup commentedon Aug 7, 2024
Ok, I've renamed this to be a request for a setting that just disables all of the pub stuff. With this setting, you could commit it into
.vscode/settings.jsonfor a project and nobody would see any of the pub interaction dialogs/buttons with it.I'm not familiar with Melos, but can you explain why it wouldn't be needed with Pub workspaces? Do the hooks become redundant in Pub Workspaces, or is there some mechanism for running them that I haven't seen?
lishaduck commentedon Aug 7, 2024
Yup, that'd work great.
While the post-boostrap hooks wouldn't be run, it'd delegate the resolution to pub, so bootstrapping would be done fully by pub. You could run codegen, etc, separately. It essentially becomes a fancy task runner wrapping pub.
Add a setting dart.enablePub that complete disables/hides all Pub fun…