From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.5 Received: by atuin.qyliss.net (Postfix, from userid 496) id 1A77646269; Mon, 28 Jun 2021 17:31:50 +0000 (UTC) Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id ACB2446206; Mon, 28 Jun 2021 17:31:40 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 28A9D4617B; Mon, 28 Jun 2021 17:31:39 +0000 (UTC) Received: from forward3-smtp.messagingengine.com (forward3-smtp.messagingengine.com [66.111.4.237]) by atuin.qyliss.net (Postfix) with ESMTPS id C14B646179 for ; Mon, 28 Jun 2021 17:31:35 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailforward.nyi.internal (Postfix) with ESMTP id 4E34D1940329; Mon, 28 Jun 2021 13:31:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 28 Jun 2021 13:31:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=1dFjbEtO5vpVMblkzK9VBXA2c0hMgIhwEw+jcovFY9A=; b=Pcjnnmt8 CsYzMYbvlSOlcxMANXgWvNzFoNxPaEETSnt5/CjtfS8Fb4GvQXWGjgXF8uDCWkwt Z05Bdag+pp4CsxdNvMsigIRfPXfMOFrmNAGruN3PuFeADDSulXNFFmPEI92Rsna+ Z0rX4XEIHJWhTgNsE8ootMee+sfMjV2/dD3UOgygTHCvuiI+M5lXHVE3yR/RsGw5 NumTBoQ4N692P59+5/b1E3fQWrrnyjBMfimEShDuU+AGFUkWZ/1IVgouoCX3ij/A +4aSgsUFz3DwDfeXUffsYsCXmci8ZY5nF3AbZxWi06PzhLysEJlBR8qDawP6trJv 55uZdawLC8/JzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeehgedguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlhihs shgrucftohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepgf efudekvdelieelledufeevheeglefggedvudejvddtffeuueevffehleejkedvnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepqhihlhhishhsse gvvhgvrdhqhihlihhsshdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Jun 2021 13:31:33 -0400 (EDT) Received: by eve.qyliss.net (Postfix, from userid 1000) id 94FFD1341; Mon, 28 Jun 2021 17:31:31 +0000 (UTC) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH platform2 2/2] vm_tools: proto: set go_package correctly Date: Mon, 28 Jun 2021 17:31:06 +0000 Message-Id: <20210628173106.1128138-3-hi@alyssa.is> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628173106.1128138-1-hi@alyssa.is> References: <20210628173106.1128138-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: VYXXEI7A4NUX2V74RW4IUSKR7EUCA44P X-Message-ID-Hash: VYXXEI7A4NUX2V74RW4IUSKR7EUCA44P X-MailFrom: qyliss@eve.qyliss.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Puck Meerburg X-Mailman-Version: 3.3.4 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: protoc-gen-go 1.5.x has become a lot stricter about this. We have to use import_mapping for common.proto because it ends up being included in multiple Go libraries. I'm not sure why it needs to be built once per library, but that's the way it works. --- vm_tools/proto/BUILD.gn | 5 +++++ vm_tools/proto/tremplin.proto | 2 +- vm_tools/proto/vm_crash.proto | 2 +- vm_tools/proto/vm_guest.proto | 1 + vm_tools/proto/vm_host.proto | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/vm_tools/proto/BUILD.gn b/vm_tools/proto/BUILD.gn index 79c9b94c9f..aadc40165c 100644 --- a/vm_tools/proto/BUILD.gn +++ b/vm_tools/proto/BUILD.gn @@ -60,6 +60,8 @@ goproto_library("vm-crash-gorpcs") { proto_in_dir = "./" proto_out_dir = "go/src/chromiumos/vm_tools/vm_crash" gen_grpc = true + source_relative = true + import_mapping = [ "common.proto=chromiumos/vm_tools/vm_crash" ] sources = [ "${proto_in_dir}/common.proto", "${proto_in_dir}/vm_crash.proto", @@ -97,6 +99,7 @@ goproto_library("tremplin-gorpcs") { proto_in_dir = "./" proto_out_dir = "go/src/chromiumos/vm_tools/tremplin_proto" gen_grpc = true + source_relative = true sources = [ "${proto_in_dir}/tremplin.proto" ] } @@ -120,6 +123,8 @@ goproto_library("vm-gorpcs") { proto_in_dir = "./" proto_out_dir = "go/src/chromiumos/vm_tools/vm_rpc" gen_grpc = true + source_relative = true + import_mapping = [ "common.proto=chromiumos/vm_tools/vm_rpc" ] sources = [ "${proto_in_dir}/common.proto", "${proto_in_dir}/vm_guest.proto", diff --git a/vm_tools/proto/tremplin.proto b/vm_tools/proto/tremplin.proto index aac76f7a9e..e6a7bbed0e 100644 --- a/vm_tools/proto/tremplin.proto +++ b/vm_tools/proto/tremplin.proto @@ -8,7 +8,7 @@ option cc_enable_arenas = true; // This file defines services for tremplin, the container springboard service. package vm_tools.tremplin; -option go_package = "tremplin_proto"; +option go_package = "chromiumos/vm_tools/tremplin_proto"; // This needs to be duplicated because the gyp rule for building // go code makes it difficult to have imports. diff --git a/vm_tools/proto/vm_crash.proto b/vm_tools/proto/vm_crash.proto index 6e4f62fe13..3cd4279989 100644 --- a/vm_tools/proto/vm_crash.proto +++ b/vm_tools/proto/vm_crash.proto @@ -7,7 +7,7 @@ syntax = "proto3"; option cc_enable_arenas = true; package vm_tools.cicerone; -option go_package = "vm_crash"; +option go_package = "chromiumos/vm_tools/vm_crash"; import "common.proto"; diff --git a/vm_tools/proto/vm_guest.proto b/vm_tools/proto/vm_guest.proto index 86f11d0812..d0946078d5 100644 --- a/vm_tools/proto/vm_guest.proto +++ b/vm_tools/proto/vm_guest.proto @@ -8,6 +8,7 @@ option cc_enable_arenas = true; // This file defines services that will be running in the guest VM. package vm_tools; +option go_package = "chromiumos/vm_tools/vm_rpc"; import "common.proto"; import "google/protobuf/timestamp.proto"; diff --git a/vm_tools/proto/vm_host.proto b/vm_tools/proto/vm_host.proto index a8bd066f61..19759b0271 100644 --- a/vm_tools/proto/vm_host.proto +++ b/vm_tools/proto/vm_host.proto @@ -8,6 +8,7 @@ option cc_enable_arenas = true; // This file defines services that will be running on the host for the VM. package vm_tools; +option go_package = "chromiumos/vm_tools/vm_rpc"; import "common.proto"; -- 2.31.1