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
[pcl] Do not panic when the type of PCL local variable isn't known #12670
Conversation
Changelog[uncommitted] (2023-04-13)Miscellaneous
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, the nil checks a bit odd though
@@ -36,6 +36,9 @@ func (lv *LocalVariable) SyntaxNode() hclsyntax.Node { | |||
} | |||
|
|||
func (lv *LocalVariable) Traverse(traverser hcl.Traverser) (model.Traversable, hcl.Diagnostics) { | |||
if lv == nil || lv.Type() == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can lv itself be nil here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure tbh, though I don't think so 🤔
bors merge |
12670: [pcl] Do not panic when the type of PCL local variable isn't known r=Zaid-Ajaj a=Zaid-Ajaj Another small fix for PCL binding so that we don't panic when the type of a local variable isn't known. ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 12674: Improve plugin install help text r=Zaid-Ajaj a=Frassle <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> `@EvanBoyle` commented that it wasn't that clear that VERSION was optional in this command. ``` Install one or more plugins. This command is used manually install plugins required by your program. It may be run either with a specific KIND, NAME, and optionally VERSION, or by omitting these and letting Pulumi compute the set of plugins that may be required by the current project. If specified VERSION cannot be a range: it must be a specific number. If not specified pulumi will try to look up the latest version of the plugin, this is not always possible. If you let Pulumi compute the set to download, it is conservative and may end up downloading more plugins than is strictly necessary. Usage: pulumi plugin install [KIND NAME [VERSION]] [flags] ``` Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com> Co-authored-by: Fraser Waters <fraser@pulumi.com>
Build failed (retrying...): |
12670: [pcl] Do not panic when the type of PCL local variable isn't known r=Zaid-Ajaj a=Zaid-Ajaj Another small fix for PCL binding so that we don't panic when the type of a local variable isn't known. ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
Build failed: |
bors retry |
Build succeeded: |
Another small fix for PCL binding so that we don't panic when the type of a local variable isn't known.
Checklist
make changelog
and committed thechangelog/pending/<file>
documenting my change