pulumi/sdk/go/common
Pat Gavlin b278d4baa9
[utils] Handle nils in mapper encoding (#9810)
* [utils] Handle nils in mapper encoding

The mapper was not handling nil values correctly during encoding. When
attempting to encode a nil `reflect.Value`, the mapper was converting it
to a nil `interface{}`, then taking the `reflect.ValueOf` that interface
value, leading to an invalid `reflect.Value` that tripped an assertion.
These changes avoid the intermediate `interface{}` and consequent
invalid `reflect.Value`.

Contributes to https://github.com/pulumi/pulumi-command/issues/41 and
https://github.com/pulumi/pulumi-command/issues/68.

* Add test

* CL

Co-authored-by: Ian Wahbe <ian@wahbe.com>
2022-06-16 15:43:23 -07:00
..
apitype Send smart aliases via gRPC to engine (#9731) 2022-06-16 22:07:28 +01:00
constant expose execution kind via update metadata (#5258) 2020-08-31 09:07:59 -07:00
diag Send smart aliases via gRPC to engine (#9731) 2022-06-16 22:07:28 +01:00
encoding Add gzip flag to filestate backend (#9610) 2022-05-23 12:13:21 -07:00
resource Send smart aliases via gRPC to engine (#9731) 2022-06-16 22:07:28 +01:00
testing ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
tokens Update tokens.Name to match what's actually in the service (#9163) 2022-03-11 17:06:18 +00:00
tools Toward replacing MSBuild with make+bash on Windows (#8617) 2022-01-07 22:27:14 -05:00
util [utils] Handle nils in mapper encoding (#9810) 2022-06-16 15:43:23 -07:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace [schema] Faster schema loading via caching alongside plugins (#9686) 2022-06-13 23:27:11 -07:00