Skip to content

Prevent running "pub get" for all projects in the same workspace in "Get Packages for all Projects" command - #5990

Merged
DanTup merged 6 commits into
masterfrom
fix-get-packages-for-all
Mar 19, 2026
Merged

DanTup merged 6 commits into
masterfrom
fix-get-packages-for-all

Conversation

@DanTup

@DanTup DanTup commented Mar 19, 2026

Copy link
Copy Markdown
Member

Fixes #5978

@DanTup DanTup added this to the v3.132.0 milestone Mar 19, 2026
@DanTup DanTup added is bug fix in commands Relates to commands (usually invoked from the command Palette) labels Mar 19, 2026
@DanTup
DanTup requested a review from Copilot March 19, 2026 14:15
@DanTup

This comment was marked as outdated.

@gemini-code-assist

This comment was marked as outdated.

This comment was marked as resolved.

@DanTup

DanTup commented Mar 19, 2026

Copy link
Copy Markdown
Member Author

/gemini review

devin-ai-integration[bot]

This comment was marked as resolved.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors how project folders are identified for package management, specifically for 'Get Packages for All Projects'. It introduces a new utility function, getPubWorkspaceOrPackageFolders, to correctly identify pub workspace roots and standalone packages, ensuring pub get is run only on these top-level entities rather than every sub-project within a workspace. The uniq utility function was updated for conciseness and potential performance. Several internal API changes were made, including making runCustomGetSDKCommand public, adding clearCaches to the internal API, and removing DaemonCapabilities from it. The resolvedPromise utility was simplified to resolve with undefined. Additionally, caching logic for project folder searches was improved to prevent stale results, and various test files were updated to use non-null assertions for privateApi.testController or make it optional where appropriate, along with a new test case to validate the pub workspace folder logic. The logging for CI builds was adjusted to delete logs for skipped tests as well, to save space.

@codecov

codecov Bot commented Mar 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.66%. Comparing base (662d567) to head (b05ba04).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5990      +/-   ##
==========================================
+ Coverage   67.61%   67.66%   +0.05%     
==========================================
  Files         170      170              
  Lines       12979    12984       +5     
  Branches     2571     2571              
==========================================
+ Hits         8776     8786      +10     
+ Misses       3741     3737       -4     
+ Partials      462      461       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DanTup
DanTup merged commit ddfd1fa into master Mar 19, 2026
26 checks passed
@DanTup
DanTup deleted the fix-get-packages-for-all branch March 19, 2026 14:56
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter: Get Packages for All Projects doesn't consider workspace

2 participants