pulumi/pkg
joeduffy 3f54c672be Fix/alter a few aspects of RPC code-generation
* Use --out-rpc, rather than --out-provider, since rpc/ is a peer to provider/.

* Use strongly typed tokens in more places.

* Append "rpc" to the generated RPC package names to avoid conflicts.

* Change the Check function to return []mapper.FieldError, rather than
  mapper.DecodeError, to make the common "no errors" case easier (and to eliminate
  boilerplate resulting in needing to conditionally construct a mapper.DecodeError).

* Rename the diffs argument to just diff, matching the existing convention.

* Automatically detect changes to "replaces" properties in the PreviewUpdate
  function.  This eliminates tons of boilerplate in the providers and handles the
  90% common case for resource recreation.  It's still possible to override the
  PreviewUpdate logic, of course, in case there is more sophisticated recreation
  logic necessary than just whether a property changed or not.

* Add some comments on some generated types.

* Generate property constants for the names as they will appear in weakly typed
  property bags.  Although the new RPC interfaces are almost entirely strongly
  typed, in the event that diffs must be inspected, this often devolves into using
  maps and so on.  It's much nicer to say `if diff.Changed(SecurityGroup_Description)`
  than `if diff.Changed("description")` (and catches more errors at compile-time).

* Fix resource ID generation logic to properly fetch the Underlying() type on
  named types (this would sometimes miss resources during property analysis, emitting
  for example `*VPC` instead of `*resource.ID`).
2017-04-27 10:36:22 -07:00
..
compiler Lower instanceof in CocoJS; implement IsInst in CocoIL 2017-04-20 17:38:15 -07:00
diag Add optional formatting to the diag.Message API 2017-03-15 12:16:56 -07:00
encoding Add a TryLoadDynamicExpression IL opcode 2017-04-19 16:49:59 -07:00
eval Lower instanceof in CocoJS; implement IsInst in CocoIL 2017-04-20 17:38:15 -07:00
graph Use github.com/pkg/errors for errors 2017-04-19 14:46:50 -07:00
pack Use github.com/pkg/errors for errors 2017-04-19 14:46:50 -07:00
resource Add an initial implementation of CIDLC 2017-04-25 15:05:51 -07:00
tokens Permit dashes in package names 2017-04-19 10:53:14 -07:00
tools/cidlc Fix/alter a few aspects of RPC code-generation 2017-04-27 10:36:22 -07:00
util Use github.com/pkg/errors for errors 2017-04-19 14:46:50 -07:00
workspace Make major commands more pleasant 2017-03-21 19:23:32 -07:00