feat(azure-policy): add compiler skeleton with core types and stubs#674
feat(azure-policy): add compiler skeleton with core types and stubs#674anakrish wants to merge 1 commit intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an initial Azure Policy AST → RVM compiler module scaffold under languages::azure_policy, establishing public compile entry points, core compiler state/register plumbing, and a set of stub submodules to be implemented in follow-up commits.
Changes:
- Exposes a new
azure_policy::compilermodule and public compile entry points for rules/definitions (with alias-resolution variants). - Introduces
Compilercore infrastructure (program construction, register allocation, span/source mapping, emit helpers). - Adds utility helpers for path splitting and AST JSON → runtime
Valueconversion; other compiler submodules are currently stubs.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/languages/azure_policy/mod.rs | Exposes the new compiler module from the Azure Policy language surface. |
| src/languages/azure_policy/compiler/mod.rs | Defines compiler module layout and public compilation entry points + parameter-default extraction. |
| src/languages/azure_policy/compiler/core.rs | Core Compiler struct, program pipeline skeleton, register/span/emit helpers. |
| src/languages/azure_policy/compiler/utils.rs | Helper functions for literal extraction, path splitting, and JSON value conversion to runtime Value. |
| src/languages/azure_policy/compiler/conditions.rs | Stub for constraint/condition compilation. |
| src/languages/azure_policy/compiler/conditions_wildcard.rs | Stub for wildcard condition handling. |
| src/languages/azure_policy/compiler/count.rs | Stub for count loop compilation (+ placeholder optimization hook). |
| src/languages/azure_policy/compiler/count_any.rs | Stub for count→Any optimization. |
| src/languages/azure_policy/compiler/count_bindings.rs | Stub for count-binding resolution and current() references. |
| src/languages/azure_policy/compiler/effects.rs | Stub for effect compilation and wrapping result. |
| src/languages/azure_policy/compiler/effects_modify_append.rs | Stub for Modify/Append effect detail compilation. |
| src/languages/azure_policy/compiler/expressions.rs | Stub for template/call expression compilation. |
| src/languages/azure_policy/compiler/fields.rs | Stub for field-kind/path/resource path compilation. |
| src/languages/azure_policy/compiler/metadata.rs | Stub for metadata/annotation accumulation and population. |
| src/languages/azure_policy/compiler/template_dispatch.rs | Stub for ARM template function dispatch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6d193d1 to
e5a924b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e5a924b to
62c0bcb
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
62c0bcb to
96d273e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
96d273e to
0e8a5f0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0e8a5f0 to
72e4e94
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
72e4e94 to
0c1dd36
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0c1dd36 to
78d4e2a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
78d4e2a to
00d8e7b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
00d8e7b to
b775003
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add the compiler module structure with: - core.rs: Compiler struct, CountBinding, new(), compile() pipeline, register allocation, span/emit helpers - mod.rs: module declarations, public entry points (compile_policy_rule, compile_policy_definition, etc.) - utils.rs: pure helper functions (path splitting, JSON conversion) - Stub files for conditions, expressions, fields, template dispatch, count, effects, and metadata — real implementations follow in subsequent commits.
b775003 to
68d935f
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add the compiler module structure with: