Skip to content

Commit ef6dc6c

Browse files
authored
Influxdb{2}: fix build with Rust1.83 compat (#368122)
2 parents ec49f73 + fc4e2d3 commit ef6dc6c

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

pkgs/servers/nosql/influxdb/default.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ let
3434
hash = "sha256-6LOTgbOCfETNTmshyXgtDZf9y4t/2iqRuVPkz9dYPHc=";
3535
})
3636
../influxdb2/fix-unsigned-char.patch
37+
# https://github.com/influxdata/flux/pull/5516
38+
../influxdb2/rust_lifetime.patch
3739
];
40+
# Don't fail on missing code documentation
41+
postPatch = ''
42+
substituteInPlace flux-core/src/lib.rs \
43+
--replace-fail "deny(warnings, missing_docs))]" "deny(warnings))]"
44+
'';
3845
sourceRoot = "${src.name}/libflux";
3946
cargoHash = "sha256-O+t4f4P5291BuyARH6Xf3LejMFEQEBv+qKtyjHRhclA=";
4047
nativeBuildInputs = [ rustPlatform.bindgenHook ];
@@ -95,7 +102,9 @@ buildGoModule rec {
95102

96103
excludedPackages = "test";
97104

98-
passthru.tests = { inherit (nixosTests) influxdb; };
105+
passthru.tests = {
106+
inherit (nixosTests) influxdb;
107+
};
99108

100109
meta = with lib; {
101110
description = "Open-source distributed time series database";

pkgs/servers/nosql/influxdb2/default.nix

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@ let
5050
hash = "sha256-6LOTgbOCfETNTmshyXgtDZf9y4t/2iqRuVPkz9dYPHc=";
5151
})
5252
./fix-unsigned-char.patch
53+
# https://github.com/influxdata/flux/pull/5516
54+
./rust_lifetime.patch
5355
];
56+
# Don't fail on missing code documentation
57+
postPatch = ''
58+
substituteInPlace flux-core/src/lib.rs \
59+
--replace-fail "deny(warnings, missing_docs))]" "deny(warnings))]"
60+
'';
5461
sourceRoot = "${src.name}/libflux";
5562
cargoHash = "sha256-O+t4f4P5291BuyARH6Xf3LejMFEQEBv+qKtyjHRhclA=";
5663
nativeBuildInputs = [ rustPlatform.bindgenHook ];
@@ -74,7 +81,6 @@ let
7481
install_name_tool -id $out/lib/libflux.dylib $out/lib/libflux.dylib
7582
'';
7683
};
77-
7884
in
7985
buildGoModule {
8086
pname = "influxdb";
@@ -132,7 +138,9 @@ buildGoModule {
132138
"-X main.version=${version}"
133139
];
134140

135-
passthru.tests = { inherit (nixosTests) influxdb2; };
141+
passthru.tests = {
142+
inherit (nixosTests) influxdb2;
143+
};
136144

137145
meta = with lib; {
138146
description = "Open-source distributed time series database";
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/flux-core/src/ast/walk/mod.rs b/flux-core/src/ast/walk/mod.rs
2+
index 90f70ba6f7..a6966827e8 100644
3+
--- a/flux-core/src/ast/walk/mod.rs
4+
+++ b/flux-core/src/ast/walk/mod.rs
5+
@@ -180,7 +180,7 @@ impl<'a> Node<'a> {
6+
7+
impl<'a> Node<'a> {
8+
#[allow(missing_docs)]
9+
- pub fn from_expr(expr: &'a Expression) -> Node {
10+
+ pub fn from_expr(expr: &'a Expression) -> Node<'a> {
11+
match expr {
12+
Expression::Identifier(e) => Node::Identifier(e),
13+
Expression::Array(e) => Node::ArrayExpr(e),
14+
diff --git a/flux-core/src/parser/mod.rs b/flux-core/src/parser/mod.rs
15+
index ac7d4b9a72..561c3a0ff6 100644
16+
--- a/flux-core/src/parser/mod.rs
17+
+++ b/flux-core/src/parser/mod.rs
18+
@@ -41,7 +41,7 @@ pub struct Parser<'input> {
19+
20+
impl<'input> Parser<'input> {
21+
/// Instantiates a new parser with the given string as input.
22+
- pub fn new(src: &'input str) -> Parser {
23+
+ pub fn new(src: &'input str) -> Parser<'input> {
24+
let s = Scanner::new(src);
25+
Parser {
26+
s,

0 commit comments

Comments
 (0)