platform_build_blueprint/bootstrap
Colin Cross ed49204e85 Use generics for providers API
Using generics for the providers API allows a type to be associated
with a ProviderKey, resulting in a type-safe API without that doesn't
require runtime type assertions by every caller.

Unfortunately, Go does not allow generic types in methods, only in
functions [1].  This prevents a type-safe API on ModuleContext, and
requires moving the API to be functions that take a ModuleContext as
a parameter.

[1] https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#no-parameterized-methods)

Bug: 316410648
Test: provider_test.go
Change-Id: Ide91de9f2a2a7d075b05e287c7cc86b395db0edb
2023-12-14 16:59:16 -08:00
..
bpdoc Change bpdoc to separate entries with the same type 2021-11-02 15:59:48 +00:00
bpglob Remove the -v argument from bpglob. 2021-11-04 11:48:43 +01:00
bootstrap.go Use generics for providers API 2023-12-14 16:59:16 -08:00
command.go Use strings instead of simpleNinjaStrings where possible 2023-11-01 15:15:15 -07:00
config.go Add VariableFuncContext argument to VariableFuncs 2022-11-04 18:21:31 +00:00
glob.go Make RunBlueprint() return an error, if need be. 2023-06-20 09:44:50 +00:00
writedocs.go Export goPackage and goBinary from bootstrap package 2023-06-22 23:50:02 +00:00