From 9e9833926bc8e486bbb7e3eb113977aa6f4f8b57 Mon Sep 17 00:00:00 2001 From: cmita Date: Fri, 23 Jul 2021 01:18:59 -0700 Subject: [PATCH] Add library parameter to GoPackageInfo Starlark constructor We can't trivial replicate the behaviour of this in Starlark without exposing even more detail. PiperOrigin-RevId: 386407724 --- .../lib/starlarkbuildapi/go/GoPackageInfoApi.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/go/GoPackageInfoApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/go/GoPackageInfoApi.java index a583ce9cd4b12b..5dc968329e72f3 100644 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/go/GoPackageInfoApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/go/GoPackageInfoApi.java @@ -52,6 +52,15 @@ public interface Provider extends ProviderApi { named = true, allowedTypes = {@ParamType(type = FileApi.class), @ParamType(type = NoneType.class)}), @Param(name = "imports", positional = false, named = true), + @Param( + name = "library", + positional = false, + named = true, + allowedTypes = { + @ParamType(type = GoPackageInfoApi.class), + @ParamType(type = NoneType.class) + }, + defaultValue = "None"), @Param(name = "test", positional = false, named = true), @Param( name = "is_proto_library", @@ -66,6 +75,7 @@ GoPackageInfoApi createGoPackageInfo( Sequence srcs, Object exportDataObject, Sequence imports, + Object library, boolean test, boolean isProtolibrary) throws EvalException;