summary refs log tree commit diff
path: root/pkgs/servers/monitoring/kapacitor/fix-linting-error-on-unneeded-clone.patch
diff options
context:
space:
mode:
authorManuel Frischknecht <manuel.frischknecht@gmail.com>2023-11-26 19:46:45 +0100
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-11-27 13:15:44 +0000
commit7f706a07d27b4d44dcc55cf4c832fe8d98569214 (patch)
tree8755981174466a0e45b8b36497ac9f3fe239b8e0 /pkgs/servers/monitoring/kapacitor/fix-linting-error-on-unneeded-clone.patch
parentfa1c8834c9fe613fe3f84d6c524bb1779e50cd6e (diff)
kapacitor: fix build of embedded `libflux` dependency with current rust
The embedded `libflux` dependency of `kapacitor` fails to build with
more current rust tooling due to an unneeded `.clone()` call that
is promoted into an error message by a strict linting build config.

This introduces a patch that removes the offending method call.
The issue is already resolved upstream, but even the current `kapacitor`
version still depends on this specific version of `libflux` [1], and the
respective git commit contains a lot of other (automated) changes [2],
so cherry-picking the patch via a GitHub URL seems even more brittle.

[1]: https://github.com/influxdata/kapacitor/blob/v1.7.1/go.mod#L26
[2]: https://github.com/influxdata/flux/commit/e7f7023848929e16ad5bd3b41d217847bd4fd72b#diff-96572e971d9e19b54290a434debbf7db054b21c9ce19035159542756ffb8ab87

(cherry picked from commit 8e6e709ca1fcdb1d3a75b117c90cce769cd6b65a)
Diffstat (limited to 'pkgs/servers/monitoring/kapacitor/fix-linting-error-on-unneeded-clone.patch')
-rw-r--r--pkgs/servers/monitoring/kapacitor/fix-linting-error-on-unneeded-clone.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/servers/monitoring/kapacitor/fix-linting-error-on-unneeded-clone.patch b/pkgs/servers/monitoring/kapacitor/fix-linting-error-on-unneeded-clone.patch
new file mode 100644
index 0000000000000..23391f0f4f384
--- /dev/null
+++ b/pkgs/servers/monitoring/kapacitor/fix-linting-error-on-unneeded-clone.patch
@@ -0,0 +1,13 @@
+diff --git a/flux-core/src/semantic/flatbuffers/types.rs b/flux-core/src/semantic/flatbuffers/types.rs
+index c3eecf06..9baf4070 100644
+--- a/flux-core/src/semantic/flatbuffers/types.rs
++++ b/flux-core/src/semantic/flatbuffers/types.rs
+@@ -715,7 +715,7 @@ mod tests {
+
+     fn test_serde(expr: &'static str) {
+         // let want = parser::parse(expr).unwrap();
+-        let mut p = parser::Parser::new(expr.clone());
++        let mut p = parser::Parser::new(expr);
+
+         let typ_expr = p.parse_type_expression();
+         if let Err(err) = ast::check::check(ast::walk::Node::TypeExpression(&typ_expr)) {