Skip to content

pub get on save + auto-save is super aggro #1427

Closed

Description

@anaisbetts

If you have VS Code's "Auto Save" option enabled, the behavior of "Run pub get / flutter packages get on save" runs way too often, to the point that it's difficult to type. If Auto Save is enabled, maybe ratchet up the debounce to 10sec or so?

Activity

  1. DanTup commented on Jan 27, 2019

    @DanTup
    Member

    Oh dear, this does sound terrible :(

    Weirdly, we can receive the reason for save (TextDocumentSaveReason) in TextDocumentWillSaveEvent but not for did-save, which would allow us to handle this better (we could delay it when autosaved, but still do it immediately if you hit Ctrl+S).

    I'll file a request to see if they'll add that, and see what I can come up with in the meantime (we can query the settings, so your idea of debouncing if it's enabled may work - though it means you'll see a delay even if you Ctrl+S).

  2. added this to the v2.23.0 milestone on Jan 27, 2019
  3. added
    in editorRelates to code editing or language features
    in commandsRelates to commands (usually invoked from the command Palette)
    on Jan 27, 2019
  4. DanTup commented on Jan 27, 2019

    @DanTup
    Member

    I opened microsoft/vscode#67190, feel free to add a 👍 :)

  5. DanTup commented on Jan 28, 2019

    @DanTup
    Member

    VS Code response:

    Closing this because it would require API breakage and because the information asked for is available in the onWillSave-event

    I guess we'll need to do something a little more hackyimaginative...

  6. anaisbetts commented on Jan 28, 2019

    @anaisbetts
    Author

    No problem, thanks for looking into it!

  7. added 3 commits that reference this issue on Jan 29, 2019
    4c8642e
    7beeb5f
    5f41114
  8. added a commit that references this issue on Jan 31, 2019
    8825890
  9. DanTup commented on Feb 6, 2019

    @DanTup
    Member

    @paulcbetts there's a new beta build here that includes this functionality. Please try it out and let me know if you have any issues!

    https://github.com/Dart-Code/Dart-Code/releases/tag/v2.23.0-beta.2

  10. thosakwe commented on Sep 24, 2019

    @thosakwe

    Question - is there an option to completely disable automatically running pub get?

  11. DanTup commented on Sep 30, 2019

    @DanTup
    Member

    @thosakwe that's what the dart.runPubGetOnPubspecChanges setting should do. Pubspec changes are the only thing that should result in automatic pub get. If you've set that setting to false and still see it running automatically, please open an issue with details.

  12. thosakwe commented on Sep 30, 2019

    @thosakwe
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 bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions