-
Notifications
You must be signed in to change notification settings - Fork 49
Try to fix issues caused from old Platformio leftovers in .platformio/packages
#213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes add a utility function to safely remove directories matching a pattern and enhance the tool installation logic to clean up stale or versioned tool directories before caching or reinstalling tools. Additional logging and error handling are introduced to improve robustness during directory cleanup operations related to tool version management. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Espressif32Platform
participant FileSystem
User->>Espressif32Platform: Install or update tool
Espressif32Platform->>FileSystem: Scan packages directory for tool subdirs
Espressif32Platform->>FileSystem: Remove subdirs matching tool_name + '@*' or tool_name + '.*'
FileSystem-->>Espressif32Platform: Confirmation of removal
Espressif32Platform->>FileSystem: Remove main tool directory (if needed)
FileSystem-->>Espressif32Platform: Confirmation of removal
Espressif32Platform->>User: Proceed with tool installation or caching
Assessment against linked issues
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@swoboda1337 can you try the PR branch? I think it could fix the issues you have seen with esphome |
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
platform.py
(4 hunks)
🔇 Additional comments (3)
platform.py (3)
15-15
: LGTM!The
fnmatch
import is correctly added and necessary for the pattern matching functionality in the newsafe_remove_directory_pattern
function.
171-181
: LGTM!The implementation correctly identifies and removes directories containing '@' that start with the tool name. This effectively cleans up old PlatformIO versioned packages as intended.
331-344
: LGTM!The enhanced cleanup logic correctly removes versioned tool directories (e.g.,
xtensa@src
,xtensa.12232
) before removing the main tool directory. The sequencing ensures all related directories are cleaned up during reinstallation.
Description:
The PR deletes all folders found with
@
in tool / toolchain folder name, before installing pioarduino tools / toolchains with tl-install.Probably fix #208
Checklist:
Summary by CodeRabbit