Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic on empty collections #1054

Merged
merged 1 commit into from May 1, 2023

Conversation

justinvp
Copy link
Member

@justinvp justinvp commented May 1, 2023

This change fixes a panic in camelCaseObjectAttributes when the collection is empty. I was hitting this when trying to convert the terraform-aws-github-runner example.

Fixes #1053

This change fixes a panic in `camelCaseObjectAttributes` when the collection is empty. I was hitting this when trying to convert the `terraform-aws-github-runner` example.
@justinvp justinvp requested review from Zaid-Ajaj and Frassle May 1, 2023 12:48
@github-actions
Copy link

github-actions bot commented May 1, 2023

Diff for pulumi-random with merge commit 872e94a

@github-actions
Copy link

github-actions bot commented May 1, 2023

Diff for pulumi-azuread with merge commit 872e94a

@github-actions
Copy link

github-actions bot commented May 1, 2023

Diff for pulumi-azure with merge commit 872e94a

Copy link
Contributor

@Zaid-Ajaj Zaid-Ajaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

cty.MapVal will panic on empty maps. So will cty.ListVal.

That is a very interesting API design choice

Copy link
Contributor

@Zaid-Ajaj Zaid-Ajaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

cty.MapVal will panic on empty maps. So will cty.ListVal.

That is a very interesting API design choice

@justinvp justinvp merged commit f241e18 into fraser/experimentalConverter May 1, 2023
7 of 8 checks passed
@justinvp justinvp deleted the justin/camelCase_panic branch May 1, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants