blob: 5223bee709a21182ccccccf78691cdc5a7e960f7 [file] [log] [blame]
Lorenz Brun6c39ea12019-11-04 11:39:42 +01001Copyright 2020 The Monogon Project Authors.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14
15
16From d73ca1c4da53336442d2d256e70ce2acc45e4275 Mon Sep 17 00:00:00 2001
17From: Mostyn Bramley-Moore <mostynb@vewd.com>
18Date: Thu, 17 Oct 2019 14:00:18 +0200
19Subject: [PATCH] avoid unexpected keyword error by using positional parameters
20
21This avoids the following error, when building with bazel 1.0:
22...
23 File "/home/user/kubernetes/build/code_generation.bzl", line 44, in go_pkg
24 pkg.replace("staging/src/", "vendor/", maxsplit ...)
25unexpected keyword 'maxsplit', for call to method replace(old, new, maxsplit = None) of 'string'
26
27Fixes #81382
28---
29 build/code_generation.bzl | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32diff --git a/build/code_generation.bzl b/build/code_generation.bzl
33index eed223eb86..6feef4ba6e 100644
34--- a/build/code_generation.bzl
35+++ b/build/code_generation.bzl
36@@ -41,7 +41,7 @@ def go_pkg(pkg):
37 ...
38 )
39 """
40- return go_prefix + "/" + pkg.replace("staging/src/", "vendor/", maxsplit = 1)
41+ return go_prefix + "/" + pkg.replace("staging/src/", "vendor/", 1)
42
43 def openapi_deps():
44 deps = [
45--
462.20.1
47