Phase 6: Compiler and DSL Integration - #10
Merged
Merged
Conversation
Stored unified-ui DSL definitions in Ash Resource attributes: - DSL storage format with type, props, children, signals - DSL builder helpers (root, row, column, text, button, input, container) - Signal binding helpers - DSL validation at write time - Widget type validation - Signal reference validation - Circular reference detection - Metadata management - Tests for DSL storage and builder
Integrated unified-ui compiler with Ash Resource loading: - Enhanced AshUI.Compiler with unified-ui compilation path - compile_screen/2 with caching support - compile_from_unified_dsl/2 for direct DSL compilation - compile_batch/2 for batch compilation - ETS-based compilation caching with TTL - Cache invalidation and statistics - init_cache/0 for application startup - Tests for compiler integration
Implemented efficient recompilation when resources change: - Track resource dependencies (element-to-screen, binding-to-element) - Dependency graph building for screens - Circular dependency detection - Selective recompilation on resource change - Batch recompilation for multiple changes - Cache-aware recompilation (only recompile affected screens) - Tests for incremental compilation
Implemented custom widget and layout registration: - register_widget/2 for custom widget types - register_layout/2 for custom layout types - get_widget/1 and get_layout/1 for looking up extensions - compile_widget/2 and compile_layout/2 for compilation - unregister_widget/1 and unregister_layout/1 for cleanup - validate_widget_spec/1 and validate_layout_spec/1 - available_widget_types/0 and available_layout_types/0 - init/0 for initializing extension registries - Tests for compiler extensions
Added comprehensive integration tests for Phase 6: - DSL storage and retrieval scenarios - Compilation scenarios (simple, complex, error handling, caching) - Incremental compilation scenarios (dependencies, cache, circular detection) - Extension scenarios (custom widgets, custom layouts) - End-to-end compilation flows - Performance scenarios
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates the unified-ui compiler with Ash Resource loading to enable database-driven UI definitions.
Section 6.1 - Unified-UI DSL Storage
Section 6.2 - Compiler Integration
Section 6.3 - Incremental Compilation
Section 6.4 - Compiler Extensions
Section 6.5 - Integration Tests
Test plan