Skip to content

Add a setting to completely disable using pub (no prompts, no automatic running, no commands/toolbar buttons) #5213

Closed

Description

@lishaduck

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)

Additional context
n/a?

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Aug 2, 2024
  2. added
    awaiting infoRequires more information from the customer to progress
    on Aug 5, 2024
  3. DanTup commented on Aug 5, 2024

    @DanTup
    Member

    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.

  4. lishaduck commented on Aug 6, 2024

    @lishaduck
    Author

    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.

    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.

    Yeah, it does what's needed, it's just that the dialogs and such from the Dart extension are annoying.

  5. 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
  6. added
    in editorRelates to code editing or language features
    in commandsRelates to commands (usually invoked from the command Palette)
    and removed
    awaiting infoRequires more information from the customer to progress
    on Aug 7, 2024
  7. added this to the v3.96.0 milestone on Aug 7, 2024
  8. DanTup commented on Aug 7, 2024

    @DanTup
    Member

    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?

  9. modified the milestones: v3.96.0, On Deck on Aug 7, 2024
  10. lishaduck commented on Aug 7, 2024

    @lishaduck
    Author

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in commandsRelates to commands (usually invoked from the command Palette)in editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions