Skip to content

Conversation

@ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Oct 18, 2025

Description

Updated safe_remove to use Unix-style paths for directory checks and messages, improving compatibility on Windows systems.

TODO:

  • ensure Android cleanup is reporting properly on Windows runners.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Updated safe_remove to use Unix-style paths for directory checks and messages, improving compatibility on Windows systems.
@codecov
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4881c19) to head (030eeb3).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #67   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          819       819           
  Branches        82        82           
=========================================
  Hits           819       819           
Flag Coverage Δ
Linux 100.00% <ø> (ø)
Windows 83.02% <ø> (ø)
macOS 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Converts ANDROID_HOME to a Unix path before removal to ensure safe and consistent deletion. This prevents potential issues with path formats on different platforms.
@ReenigneArcher ReenigneArcher force-pushed the fix/more_space/android-space-reporting branch from bec9b9f to 83f708c Compare October 19, 2025 02:34
Before removing directories on Windows, the script now outputs their size for debugging purposes. After attempting removal, it verifies whether the directory was successfully deleted and prints a corresponding message.
Updated the cleanup.sh script to convert Unix paths to Windows format using cygpath before passing them to PowerShell, ensuring accurate directory size calculation on Windows systems.
Eliminates the verification step that checked if a directory still existed after removal. Adds a delay for Windows systems to allow the filesystem to update after deletion.
@ReenigneArcher ReenigneArcher force-pushed the fix/more_space/android-space-reporting branch from af0e489 to 214e10e Compare October 19, 2025 03:22
Switches to using PowerShell's Remove-Item for directory removal on Windows, providing more reliable handling of Windows paths. Retains rm -rf for Unix systems and adds logic to convert paths for PowerShell when cygpath is available.
Enhanced the safe_remove function to use PowerShell's -LiteralPath for better handling of special characters and added a fallback to cmd.exe rd if removal fails. Also added progress messages and verification to ensure directories are properly deleted.
Removes pre-removal size check and fallback deletion logic for Windows directories in safe_remove(). Now uses a single PowerShell command for removal, streamlining the process.
Revised the expected space savings values for various cleanup options across different OS environments in the README. This update reflects more accurate or recent measurements for Windows runners and other minor adjustments.
@ReenigneArcher ReenigneArcher marked this pull request as ready for review October 19, 2025 21:55
@sonarqubecloud
Copy link

@ReenigneArcher ReenigneArcher merged commit 5bb4aab into master Oct 19, 2025
66 checks passed
@ReenigneArcher ReenigneArcher deleted the fix/more_space/android-space-reporting branch October 19, 2025 23:31
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.

2 participants