pulumi/sdk/proto/go
Fraser Waters c7ed4024ff Support for integers on the wire and state protocol
An exploration into how we could support int64 as well as float64 as a
first class type in Pulumi.

There's some inherit trickiness with this because we use JSON in a few
places, state files most obviously but `PropertyValue` on the wire is
using the protobuf `Struct` and `Value` types which are just mappings to
JSON as well.

JSON doesn't have an int64 type, and while the Go JSON marshaller can
read/write int64s it's not a great behaviour to rely on given mixed
support for that across languages. Further the protobuf `Value` type
only supports float64s.

So we support integers similar to our other special types (like assets)
and wrap them in an object with a special signature field. The value
itself is either a number (if it can safely roundtrip to float64 and
back again) or a string.

Providers, SDKs and the engine communicate support for integers via
`AcceptsIntegers` fields in their interfaces (or similar). When
transmitting to a peer that doesn't support integers (e.g. an old SDK,
or old provider) all integer values are mapped back to standard number
values.

As this changes the serialisation of property values in the state file
it will trigger errors if old engines try to load a state file
containing integers.
2024-08-23 13:36:45 +01:00
..
codegen Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
testing Add SupportPack to schemas to write out in the new style (#15713) 2024-03-22 09:25:46 +00:00
alias.pb.go Support subdirectories in proto 2023-03-05 16:05:58 +00:00
analyzer.pb.go Plumb Remote, Component, and LogicalName into the import plugin system (#15199) 2024-01-24 17:15:30 +00:00
analyzer_grpc.pb.go Plumb Remote, Component, and LogicalName into the import plugin system (#15199) 2024-01-24 17:15:30 +00:00
callback.pb.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
callback_grpc.pb.go Engine support for remote transforms (#15290) 2024-02-21 16:30:46 +00:00
converter.pb.go Clean up unused import warnings (#15581) 2024-03-04 13:01:25 +00:00
converter_grpc.pb.go Add converter plugin 2023-03-09 22:16:21 +00:00
engine.pb.go Plumb Remote, Component, and LogicalName into the import plugin system (#15199) 2024-01-24 17:15:30 +00:00
engine_grpc.pb.go Plumb Remote, Component, and LogicalName into the import plugin system (#15199) 2024-01-24 17:15:30 +00:00
errors.pb.go Support subdirectories in proto 2023-03-05 16:05:58 +00:00
language.pb.go Install missing python versions using pyenv during installation (#16855) 2024-08-19 15:55:54 +00:00
language_grpc.pb.go Query language runtime for options during “pulumi new” (#16346) 2024-06-17 17:10:55 +00:00
plugin.pb.go Allow language plugins to return plugin checksums (#13776) 2023-08-25 15:26:25 +00:00
provider.pb.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
provider_grpc.pb.go Add Paramaterize to provider interface (#16174) 2024-05-15 16:22:39 +00:00
resource.pb.go Support for integers on the wire and state protocol 2024-08-23 13:36:45 +01:00
resource_grpc.pb.go implement engine support for invoke transforms (#16559) 2024-07-11 16:01:44 +00:00
source.pb.go [engine] Add support for source positions 2023-07-10 14:35:40 -07:00