pulumi/developer-docs
Fraser Waters 571fadae3f Use slice.Prealloc instead of make([]T, 0, ...)
Fixes https://github.com/pulumi/pulumi/issues/12738

https://github.com/pulumi/pulumi/pull/11834 turned on the prealloc
linter and changed a load of slice uses from just `var x T[]` to `x :=
make([]T, 0, preallocSize)`. This was good for performance but it turns
out there are a number of places in the codebase that treat a `nil`
slice as semnatically different to an empty slice.

Trying to test that, or even reason that through for every callsite is
untractable, so this PR replaces all expressions of the form `make([]T,
0, size)` with a call to `slice.Prealloc[T](size)`. When size is 0 that
returns a nil array, rather than an empty array.
2023-06-29 11:27:50 +01:00
..
architecture fix some links 2023-05-19 19:39:26 -07:00
providers Add `willReplaceOnChanges` to metaschema 2022-12-09 13:31:21 -08:00
utils Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
.gitignore Start in on developer documentation. (#7839) 2021-08-25 15:18:13 -07:00
Makefile [developer-docs] Document resource import. (#8137) 2021-10-07 12:14:37 -07:00
README.md Create README.md 2023-04-11 11:20:22 -07:00
build.md [developer-docs] Add links + a broad arch diagram (#7856) 2021-08-27 10:55:06 -07:00
conf.py [developer-docs] Add links + a broad arch diagram (#7856) 2021-08-27 10:55:06 -07:00
go.mod Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
go.sum [schema] Add the Pulumi Package metaschema. (#7952) 2021-09-20 12:00:42 -07:00
index.md [developer-docs] Document resource import. (#8137) 2021-10-07 12:14:37 -07:00
requirements.txt Start in on developer documentation. (#7839) 2021-08-25 15:18:13 -07:00

README.md

Pulumi Developer Docs

Welcome to the Pulumi Developer Docs!

To access the documentation, please visit: https://pulumi-developer-docs.readthedocs.io/en/latest/

The documentation site is designed to provide comprehensive documentation for maintainers and contributors of Pulumi.

Thank you for your interest in contributing to Pulumi!