You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Modular feature flag system using Service Provider Interface (#22361)
Refactored feature flags to use Service Provider Interface (SPI) pattern,
allowing each module to define its own feature flags that are dynamically
loaded at runtime. This eliminates the need to hardcode all feature flags
in the FeatureFlags class.
Changes:
- Added FeatureFlagProvider interface for modules to implement
- Split feature flags into domain-specific providers:
- CoreFeatureFlagProvider: Core Flow framework features
- CopilotFeatureFlagProvider: Copilot-related features (placeholder)
- HillaFeatureFlagProvider: Hilla-related features
- FlowComponentsFeatureFlagProvider: Flow Components features
- TestFeatureFlagProvider: Test-only features (in test sources)
- Updated FeatureFlags to load features dynamically via ServiceLoader
- Removed static feature flag definitions from FeatureFlags
- Maintained backward compatibility with public static references for commonly used flags
- Updated debug window to no longer filter EXAMPLE feature (now only in tests)
- Fixed Maven plugin's CombinedClassLoader to properly combine resources from all
classloaders, allowing ServiceLoader to find all service provider files
The CombinedClassLoader fix ensures that the build-dev-bundle plugin can properly
load feature flag providers by combining META-INF/services resources from all
classloaders instead of returning resources from only the first classloader.
This design provides better modularity and extensibility, allowing new modules
to easily add their own feature flags without modifying core classes.
Fixes#13356
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments