Conversation
📝 WalkthroughWalkthroughThis pull request adds support for Digistump/Digispark AVR cores by registering two new framework mappings ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/fbuild-packages/src/library/avr_framework.rs (1)
386-398: Tighten the GitHub assertions to lock the exact registry target.
contains("DigistumpArduino")would still pass for the wrong owner/repo basename. Since the mapping is the contract here, assert the exactgithubvalue and optionally the validation paths too.Suggested test tightening
fn test_digispark_dtiny_lookup() { let entry = lookup_entry("dtiny").unwrap(); - assert!(entry.github.contains("DigistumpArduino")); + assert_eq!(entry.github, "ArminJo/DigistumpArduino"); assert_eq!(entry.name, "digistump-avr-core"); + assert_eq!(entry.validation_path, "cores/tiny/Arduino.h"); assert_eq!(entry.core_dir.as_deref(), Some("tiny")); } #[test] fn test_digispark_pro_lookup() { let entry = lookup_entry("pro").unwrap(); - assert!(entry.github.contains("DigistumpArduino")); + assert_eq!(entry.github, "ArminJo/DigistumpArduino"); assert_eq!(entry.name, "digistump-avr-core"); + assert_eq!(entry.validation_path, "cores/pro/Arduino.h"); assert_eq!(entry.core_dir.as_deref(), Some("pro")); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/fbuild-packages/src/library/avr_framework.rs` around lines 386 - 398, The tests test_digispark_dtiny_lookup and test_digispark_pro_lookup currently use assert!(entry.github.contains("DigistumpArduino")), which is too loose; change these to assert the exact registry target by using assert_eq!(entry.github, "<expected owner/repo>") for each case (and keep the existing assert_eq! checks for entry.name and entry.core_dir), and optionally add precise path checks if there are validation fields to assert; locate the assertions in the test functions and replace the contains(...) checks with exact equality against the expected github string returned by lookup_entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@crates/fbuild-packages/src/library/avr_framework.rs`:
- Around line 386-398: The tests test_digispark_dtiny_lookup and
test_digispark_pro_lookup currently use
assert!(entry.github.contains("DigistumpArduino")), which is too loose; change
these to assert the exact registry target by using assert_eq!(entry.github,
"<expected owner/repo>") for each case (and keep the existing assert_eq! checks
for entry.name and entry.core_dir), and optionally add precise path checks if
there are validation fields to assert; locate the assertions in the test
functions and replace the contains(...) checks with exact equality against the
expected github string returned by lookup_entry.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0aec4d43-a393-4172-ab70-106f6f2dafeb
📒 Files selected for processing (2)
crates/fbuild-packages/assets/avr_frameworks.jsoncrates/fbuild-packages/src/library/avr_framework.rs
Summary
dtinydtinyto the package'scores/tinydirectoryproDigistump core from the same PlatformIO mappingdtinylookup from Support Digistump/Digispark dtiny AVR core for digispark-tiny #189TDD Notes
Red:
failed with:
Green:
Also verified a disposable temp
digispark-tinyproject builds successfully with:The temp project was removed after the run.
Fixes #189
Summary by CodeRabbit
New Features
dtinyandpro) powered by the Digistump Arduino core. Both frameworks are now fully registered and configured with appropriate core directory paths.Tests