Skip to content

Commit

Permalink
Fix emitting PANIC in generated programs when we don't have access …
Browse files Browse the repository at this point in the history
…to the schema of resource properties
  • Loading branch information
Zaid-Ajaj committed Apr 30, 2024
1 parent 50d31e9 commit 558575d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Improvements


### Bug Fixes
### Bug Fixes
- Fix emitting `PANIC` in generated programs when we don't have access to the schema of resource properties
5 changes: 3 additions & 2 deletions pkg/codegen/java/gen_program.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ func GenerateProgram(program *pcl.Program) (map[string][]byte, hcl.Diagnostics,
}

g := &generator{
program: program,
functionInvokes: map[string]*schema.Function{},
program: program,
functionInvokes: map[string]*schema.Function{},
currentResourcePropertyType: schema.AnyType,
}

g.Formatter = format.NewFormatter(g)
Expand Down

0 comments on commit 558575d

Please sign in to comment.