Lorenz Brun | 6c39ea1 | 2019-11-04 11:39:42 +0100 | [diff] [blame] | 1 | Copyright 2020 The Monogon Project Authors. |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License. |
| 14 | |
| 15 | |
| 16 | From d73ca1c4da53336442d2d256e70ce2acc45e4275 Mon Sep 17 00:00:00 2001 |
| 17 | From: Mostyn Bramley-Moore <mostynb@vewd.com> |
| 18 | Date: Thu, 17 Oct 2019 14:00:18 +0200 |
| 19 | Subject: [PATCH] avoid unexpected keyword error by using positional parameters |
| 20 | |
| 21 | This 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 ...) |
| 25 | unexpected keyword 'maxsplit', for call to method replace(old, new, maxsplit = None) of 'string' |
| 26 | |
| 27 | Fixes #81382 |
| 28 | --- |
| 29 | build/code_generation.bzl | 2 +- |
| 30 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 31 | |
| 32 | diff --git a/build/code_generation.bzl b/build/code_generation.bzl |
| 33 | index 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 | -- |
| 46 | 2.20.1 |
| 47 | |