Skip to content

Conversation

@DanTup
Copy link
Member

@DanTup DanTup commented Oct 9, 2025

Improves "pub get", "pub upgrade" and "flutter clean" when run in-batch. We now produce a single notification and report the names of the projects as we go through them. This also means that cancellation works correctly.

Fixes #5745
Fixes #5740

DanTup added 2 commits October 9, 2025 12:09
Improves "pub get", "pub upgrade" and "flutter clean" when run in-batch. We now produce a single notification and report the names of the projects as we go through them. This also means that cancellation works correctly.

Fixes #5745
Fixes #5740
@DanTup DanTup added this to the v3.122.0 milestone Oct 9, 2025
@DanTup DanTup added is enhancement is bug fix in commands Relates to commands (usually invoked from the command Palette) labels Oct 9, 2025
@DanTup DanTup requested a review from Copilot October 9, 2025 11:41
@DanTup
Copy link
Member Author

DanTup commented Oct 9, 2025

@codex review
/gemini review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves batch execution of commands (pub get, pub upgrade, flutter clean) by consolidating multiple individual notifications into a single progress notification. The key enhancement is that commands now report the project names as they process each item, and cancellation properly works across the entire batch operation.

  • Adds a unified progress reporting mechanism through the OperationProgress interface
  • Implements batch-aware command execution that shows project names in progress messages
  • Ensures cancellation tokens work correctly across batch operations

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/extension/commands/sdk.ts Adds OperationProgress interface and updates command methods to support optional progress reporting
src/extension/commands/packages.ts Refactors pub get/upgrade commands to use unified progress reporting for batch operations
src/extension/commands/flutter.ts Updates flutter clean command to support batch progress reporting and fixes parameter order issue

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if (!fs.existsSync(tempDir))
fs.mkdirSync(tempDir);
return this.runFlutterInFolder(tempDir, ["doctor", "-v"], "flutter", true, this.workspace.config?.flutterDoctorScript);
return this.runFlutterInFolder(tempDir, ["doctor", "-v"], "flutter", true, undefined, this.workspace.config?.flutterDoctorScript);
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter order has changed but this call passes undefined for the new operationProgress parameter and then the customScript parameter. This suggests the method signature may have been updated incorrectly. Verify that the parameter order matches the method definition.

Copilot uses AI. Check for mistakes.
@gemini-code-assist
Copy link

Thank you for requesting a code review. I am now performing a comprehensive review of the pull request, focusing on correctness, efficiency, maintainability, and security, as per the guidelines. I will provide my feedback shortly.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@DanTup DanTup merged commit 83ff534 into master Oct 9, 2025
17 checks passed
@DanTup DanTup deleted the better-batch-commands branch October 9, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in commands Relates to commands (usually invoked from the command Palette) is bug fix is enhancement

Projects

None yet

2 participants