Sitelet https://github.com/flutter/flutter/pull/171233
Skip to content

feat: remove "cmd.exe" requirement for content-hashing - #171233

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
jtmcdole:removeCmdDep
Jun 26, 2025
Merged

auto-submit[bot] merged 3 commits into
flutter:masterfrom
jtmcdole:removeCmdDep

Conversation

@jtmcdole

@jtmcdole jtmcdole commented Jun 26, 2025 •

Copy link
Copy Markdown
Member

Removing cmd.exe means content_aware_hash.ps1 runs on other platforms as well.

hash command host
728dc653e5efeb64175acce4bd2d7090781df70a content_aware_hash.sh mac
728dc653e5efeb64175acce4bd2d7090781df70a content_aware_hash.ps1 powershell 5.1 windows 11
728dc653e5efeb64175acce4bd2d7090781df70a content_aware_hash.ps1 powershell 7.5.1 macos

@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@jtmcdole
jtmcdole requested a review from matanlurey June 26, 2025 16:50

@matanlurey matanlurey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. This code is tested thoroughly

@jtmcdole jtmcdole added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 26, 2025
@auto-submit
auto-submit Bot added this pull request to the merge queue Jun 26, 2025
Merged via the queue into flutter:master with commit 685ea6c Jun 26, 2025
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 29, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 29, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 29, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2025
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
Removing cmd.exe means content_aware_hash.ps1 runs on other platforms as
well.

hash | command | host
-|-|-
728dc653e5efeb64175acce4bd2d7090781df70a | content_aware_hash.sh | mac
728dc653e5efeb64175acce4bd2d7090781df70a | content_aware_hash.ps1 |
powershell 5.1 windows 11
728dc653e5efeb64175acce4bd2d7090781df70a | content_aware_hash.ps1 |
powershell 7.5.1 macos
#. the contents of hash.txt
(git -C "$flutterRoot" ls-tree --format "%(objectname) %(path)" HEAD DEPS engine bin/internal/release-candidate-branch.version | Out-String) -replace "`r`n", "`n" | Out-File -NoNewline -Encoding ascii hash.txt
git hash-object hash.txt
Remove-Item hash.txt

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@jtmcdole only hash.txt lead to problem when run command (also when Debug with VSCode)

C:\Windows\System32>C:\Development\fvm\versions\master\bin\flutter.bat --version
Out-File: C:\Development\fvm\versions\master\bin\internal\content_aware_hash.ps1:39
Line |
  39 |  … -replace "`r`n", "`n"  | Out-File -NoNewline -Encoding ascii hash.txt
     |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Access to the path 'C:\Windows\System32\hash.txt' is denied.
Error: Unable to determine engine version...

Because working directory is C:\Windows\System32 so required Administrator on Windows to Out-File C:\Windows\System32\hash.txt

Could you add $flutterRoot before hash.txt or something not required Administrator permission?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good find - and yes, we can do that. Can you open a bug and reference this comment?

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
Removing cmd.exe means content_aware_hash.ps1 runs on other platforms as
well.

hash | command | host
-|-|-
728dc653e5efeb64175acce4bd2d7090781df70a | content_aware_hash.sh | mac
728dc653e5efeb64175acce4bd2d7090781df70a | content_aware_hash.ps1 |
powershell 5.1 windows 11
728dc653e5efeb64175acce4bd2d7090781df70a | content_aware_hash.ps1 |
powershell 7.5.1 macos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants