-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Fix validation after removing a usermod #4738
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
Fix validation after removing a usermod #4738
Conversation
PlatformIO doesn't clean out the libdir when usermods are disabled, so they still appear in the LibBuilders() set. Ensure that we validate only usermods that were actually deps for the build.
Non-platform-safe usermods are filtered out before validation runs; so this check is no longer functional.
WalkthroughThe changes refactor how WLED modules are identified and managed in the build process. WLED dependencies are now explicitly filtered and stored in the environment during project configuration, and later retrieved directly for validation, centralizing and simplifying WLED module handling across the scripts. Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (7)
🔇 Additional comments (4)
✨ Finishing Touches
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 (
|
|
Sounds like a good improvement. Not a blocker for this PR, but is it worth us considering have some CI that tests for actions like this - building then changing the usermod list? |
Maybe! Truthfully, |
When removing a usermod from an existing environment, PlatformIO does not clean up the
.pio/libdepsfolder. This confused thevalidate_modules.pyscript: to avoid replicating the usermod mapping logic, it assumed every usermod library it could see in the build ought to be included in the build. So when a usermod was removed, it would incorrectly fault claiming it wasn't included.Instead, have
load_usermods.pyleave the actual expected module list in the environment forvalidate_modules.pyto pick up.As a side effect, this disables the ability to check for modules that aren't compatible with the current platform, as they're filtered out before the list capture in
load_usermods.pyis run. (This is the normal behaviour oflib_deps, for better or for worse.) I've just removed the nonfunctional code, as out-of-tree modules are expected to be put inlib_deps, so they'll have that behaviour anyways; we might as well just be consistent about it. We can add that feature back later if it turns out to be worthwhile.Summary by CodeRabbit