|
| 1 | +# Compose Stability Analyzer IntelliJ Plugin 0.4.2 |
| 2 | + |
| 3 | +**Release Date:** November 3, 2025 |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +This release brings critical bug fixes and stability improvements to the IntelliJ IDEA plugin, ensuring accurate stability analysis for Android-specific patterns and preventing crashes when analyzing complex type hierarchies. |
| 8 | + |
| 9 | +## 🐛 Bug Fixes |
| 10 | + |
| 11 | +### Fixed @Parcelize Data Classes (Issue #3) |
| 12 | + |
| 13 | +The plugin no longer shows false warnings for `@Parcelize`-annotated data classes that implement `Parcelable`. |
| 14 | + |
| 15 | +**What was wrong:** |
| 16 | +- Classes with `@Parcelize` were incorrectly flagged with "Extends android.os.Parcelable which has runtime stability" tooltip |
| 17 | +- Even when all properties were stable (`val` with stable types), the class was marked as RUNTIME |
| 18 | + |
| 19 | +**Now fixed:** |
| 20 | +```kotlin |
| 21 | +@Parcelize |
| 22 | +data class RecordEditArgs( |
| 23 | + val id: String, // ✅ Stable |
| 24 | + val pageNumber: Int, // ✅ Stable |
| 25 | + val quote: String, // ✅ Stable |
| 26 | + val review: String, // ✅ Stable |
| 27 | + // ... all val properties with stable types |
| 28 | +) : Parcelable // ✅ Now correctly shows as STABLE |
| 29 | +``` |
| 30 | + |
| 31 | +**Technical details:** |
| 32 | +- The plugin now checks only the properties of `@Parcelize` classes |
| 33 | +- Ignores the Parcelable interface's runtime stability |
| 34 | +- If all properties are `val` and have stable types → class is STABLE |
| 35 | + |
| 36 | +### Fixed StackOverflowError for Recursive Types (Issue #11) |
| 37 | + |
| 38 | +The plugin no longer crashes when analyzing code with recursive type references or complex function type aliases. |
| 39 | + |
| 40 | +**Problematic patterns that are now handled:** |
| 41 | +```kotlin |
| 42 | +// Function type aliases |
| 43 | +typealias ScreenTransitionContent = @Composable AnimatedVisibilityScope.(Screen) -> Unit |
| 44 | + |
| 45 | +// Complex nested generics |
| 46 | +fun ScreenTransition( |
| 47 | + transitionSpec: AnimatedContentTransitionScope<Screen>.() -> ContentTransform |
| 48 | +) |
| 49 | + |
| 50 | +// Self-referential types |
| 51 | +data class Node(val children: List<Node>) |
| 52 | +``` |
| 53 | + |
| 54 | +**Solution:** Implemented cycle detection that safely breaks infinite recursion by returning RUNTIME stability when a circular reference is detected. |
| 55 | + |
| 56 | +### Fixed Compose Shape Types Stability |
| 57 | + |
| 58 | +Shape types from Compose Foundation were incorrectly showing as RUNTIME. |
| 59 | + |
| 60 | +**Fixed types:** |
| 61 | +- `RoundedCornerShape` ✅ |
| 62 | +- `CircleShape` ✅ |
| 63 | +- `CutCornerShape` ✅ |
| 64 | +- `CornerBasedShape` ✅ |
| 65 | +- `AbsoluteRoundedCornerShape` ✅ |
| 66 | +- `AbsoluteCutCornerShape` ✅ |
| 67 | +- `RectangleShape` ✅ |
| 68 | + |
| 69 | +These are now correctly recognized as STABLE types in: |
| 70 | +- Hover tooltips |
| 71 | +- Gutter icons |
| 72 | +- Inline parameter hints |
| 73 | +- Code inspections |
| 74 | + |
| 75 | +## 🎯 Visual Improvements |
| 76 | + |
| 77 | +### Gutter Icons |
| 78 | + |
| 79 | +Fixed gutter icon colors for: |
| 80 | +- ✅ Green dot for STABLE composables (including @Parcelize classes) |
| 81 | +- ⚠️ Yellow/orange dot for RUNTIME composables (only when truly runtime-dependent) |
| 82 | +- ❌ Red dot for UNSTABLE composables (mutable properties) |
| 83 | + |
| 84 | +### Hover Tooltips |
| 85 | + |
| 86 | +More accurate stability information: |
| 87 | +``` |
| 88 | +✅ Before: "Extends android.os.Parcelable which has runtime stability" |
| 89 | +✅ After: "@Parcelize with all stable properties" |
| 90 | +``` |
| 91 | + |
| 92 | +### Inline Hints |
| 93 | + |
| 94 | +Parameter hints now correctly show: |
| 95 | +- `shape: RoundedCornerShape` → **STABLE** badge (was showing RUNTIME) |
| 96 | +- `args: RecordEditArgs` → **STABLE** badge (was showing RUNTIME for @Parcelize) |
| 97 | + |
| 98 | +## 🔧 Technical Improvements |
| 99 | + |
| 100 | +### Cycle Detection |
| 101 | + |
| 102 | +Implemented ThreadLocal-based cycle detection: |
| 103 | +```kotlin |
| 104 | +private val analyzingTypes = ThreadLocal.withInitial { mutableSetOf<String>() } |
| 105 | +``` |
| 106 | + |
| 107 | +**Benefits:** |
| 108 | +- Thread-safe analysis in IDE background tasks |
| 109 | +- Prevents infinite recursion |
| 110 | +- Minimal performance overhead |
| 111 | +- Graceful handling of edge cases |
| 112 | + |
| 113 | +### Consistent with Compiler Plugin |
| 114 | + |
| 115 | +The IDEA plugin now uses the same analysis order as the compiler plugin: |
| 116 | +1. Nullable types |
| 117 | +2. Type parameters |
| 118 | +3. Function types |
| 119 | +4. Known stable types |
| 120 | +5. Annotations (@Stable, @Immutable) |
| 121 | +6. Primitives |
| 122 | +7. String, Unit, Nothing |
| 123 | +8. Collections |
| 124 | +9. Value classes |
| 125 | +10. Enums |
| 126 | +11. **@Parcelize** (new priority) |
| 127 | +12. Interfaces |
| 128 | +13. Abstract classes |
| 129 | +14. Regular classes |
| 130 | +15. @StabilityInferred |
| 131 | + |
| 132 | +This ensures IDE analysis matches compilation results. |
| 133 | + |
| 134 | +## 📦 Installation |
| 135 | + |
| 136 | +### From Disk (Recommended for Pre-Release) |
| 137 | + |
| 138 | +1. Download: [compose-stability-analyzer-idea-0.4.2.zip](https://github.com/skydoves/compose-stability-analyzer/releases/tag/0.4.2) |
| 139 | +2. Open **Android Studio** or **IntelliJ IDEA** |
| 140 | +3. Go to **Settings → Plugins** |
| 141 | +4. Click **⚙️ (gear icon) → Install Plugin from Disk...** |
| 142 | +5. Select the downloaded `.zip` file |
| 143 | +6. Restart IDE |
| 144 | + |
| 145 | +### From Marketplace (Coming Soon) |
| 146 | + |
| 147 | +Once approved by JetBrains, you'll be able to install directly from: |
| 148 | +**Settings → Plugins → Marketplace → Search "Compose Stability Analyzer"** |
| 149 | + |
| 150 | +## ⚙️ Plugin Settings |
| 151 | + |
| 152 | +The plugin settings remain unchanged. You can still customize: |
| 153 | + |
| 154 | +**Settings → Tools → Compose Stability Analyzer** |
| 155 | + |
| 156 | +- ✅ Enable/disable stability checks |
| 157 | +- 🎨 Customize gutter icon colors |
| 158 | +- 🎨 Customize inline hint colors |
| 159 | +- 📝 Set stability configuration file path |
| 160 | +- 🚫 Add ignored type patterns |
| 161 | +- ⚡ Enable Strong Skipping mode |
| 162 | + |
| 163 | +## 🐛 Known Issues |
| 164 | + |
| 165 | +None reported for this release. If you encounter any issues, please report them at: |
| 166 | +https://github.com/skydoves/compose-stability-analyzer/issues |
| 167 | + |
| 168 | +## 📊 Compatibility |
| 169 | + |
| 170 | +- **Android Studio:** 2023.3+ (Hedgehog and newer) |
| 171 | +- **IntelliJ IDEA:** 2023.3+ (Community or Ultimate) |
| 172 | +- **Kotlin:** 2.0.21+ |
| 173 | +- **Compose:** Any version |
| 174 | + |
| 175 | +## 🔄 Updating from 0.4.1 |
| 176 | + |
| 177 | +No configuration changes needed. Simply: |
| 178 | +1. Uninstall the old version (optional, IDE can update in place) |
| 179 | +2. Install 0.4.2 following the installation steps above |
| 180 | +3. Restart your IDE |
| 181 | + |
| 182 | +Your custom settings will be preserved. |
| 183 | + |
| 184 | +## 📝 What's Next? |
| 185 | + |
| 186 | +We're continuously improving the plugin. Upcoming features: |
| 187 | +- Performance optimizations for large codebases |
| 188 | +- More customization options for visual indicators |
| 189 | +- Integration with stability validation reports |
| 190 | +- Support for custom stability annotations |
| 191 | + |
| 192 | +## 🙏 Acknowledgments |
| 193 | + |
| 194 | +Special thanks to the community for reporting issues: |
| 195 | +- [@apptechxonia](https://github.com/apptechxonia) - @Parcelize issue report |
| 196 | +- [@noloman](https://github.com/noloman) - @Parcelize confirmation |
| 197 | +- [@Tolriq](https://github.com/Tolriq) - StackOverflowError report |
| 198 | + |
| 199 | +Your feedback helps make this plugin better! 🎉 |
| 200 | + |
| 201 | +## 📖 Documentation |
| 202 | + |
| 203 | +For complete documentation, visit: |
| 204 | +- [README.md](https://github.com/skydoves/compose-stability-analyzer/blob/main/README.md) |
| 205 | +- [Plugin Documentation](https://github.com/skydoves/compose-stability-analyzer/tree/main/compose-stability-analyzer-idea) |
| 206 | +- [Issue Tracker](https://github.com/skydoves/compose-stability-analyzer/issues) |
| 207 | + |
| 208 | +--- |
| 209 | + |
| 210 | +**Plugin Version:** 0.4.2 |
| 211 | +**Release Date:** November 3, 2025 |
| 212 | +**License:** Apache 2.0 |
0 commit comments