-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
Introduce an IntelliJ IDEA plugin that performs static analysis on service contract interfaces and provider annotations to catch misconfigurations, improve discoverability, and streamline SPI-based development
Why is this needed?
Service Provider Interfaces (SPIs) rely on runtime discovery via ServiceLoader, which means errors often surface only at runtime. Contributors face challenges such as:
- Missing or misconfigured
@ServiceProviderannotations - Difficulty tracing relationships between contracts and implementations
- Cross-language annotation quirks (Java vs Kotlin, repeatable vs vararg)
- Steep onboarding curve without in-IDE feedback
A dedicated plugin will surface these issues as you code, reduce runtime surprises, and accelerate the development and review process
Proposed solution
Develop a modular IntelliJ IDEA plugin that:
- Hooks into PSI and UAST to identify service contract interfaces and their annotated providers
- Validates annotation usage across Java and Kotlin sources, including repeatable and vararg styles
- Flags mismatches between contract methods/signatures and provider implementations with inline inspections
- Offers quick-fix suggestions for missing or incorrect annotations
- Displays inlay hints showing available services and their provider classes
- Enables seamless navigation from contracts to providers (and vice versa)
- Integrates with Gradle metadata to simulate
ServiceLoaderresolution and warn about missing entries - Provides a clear extension API for future inspection rules or custom annotations
This plugin will make SPI relationships explicit in the IDE, improve correctness, and lower the barrier for new contributors working with service contracts.
Checklist
- I have searched existing issues to avoid duplicates