acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / ka / kapacitor / 0001-fix-build.patch
blob04b3f624f48537682f834903f07158c3e16c20c7
1 From 3a5c573079f427dcda47176137747806200551cb Mon Sep 17 00:00:00 2001
2 From: wxt <3264117476@qq.com>
3 Date: Fri, 27 Sep 2024 21:25:14 +0800
4 Subject: [PATCH] fix build
6 ---
7 flux-core/src/semantic/flatbuffers/types.rs | 6 +++---
8 flux-core/src/semantic/nodes.rs | 5 ++---
9 flux-core/src/semantic/sub.rs | 24 ++++++++++-----------
10 flux-core/src/semantic/types.rs | 5 +++--
11 go/libflux/buildinfo.gen.go | 9 ++++----
12 5 files changed, 25 insertions(+), 24 deletions(-)
14 diff --git a/flux-core/src/semantic/flatbuffers/types.rs b/flux-core/src/semantic/flatbuffers/types.rs
15 index c3eecf0..e7e1c95 100644
16 --- a/flux-core/src/semantic/flatbuffers/types.rs
17 +++ b/flux-core/src/semantic/flatbuffers/types.rs
18 @@ -108,7 +108,7 @@ impl From<fb::PolyType<'_>> for Option<PolyType> {
19 for value in c.iter() {
20 let constraint: Option<(Tvar, Kind)> = value.into();
21 let (tv, kind) = constraint?;
22 - cons.entry(tv).or_insert_with(Vec::new).push(kind);
23 + cons.entry(tv).or_default().push(kind);
25 Some(PolyType {
26 vars,
27 @@ -345,9 +345,9 @@ where
28 builder.finished_data()
31 -pub fn deserialize<'a, T: 'a, S>(buf: &'a [u8]) -> S
32 +pub fn deserialize<'a, T, S>(buf: &'a [u8]) -> S
33 where
34 - T: flatbuffers::Follow<'a> + flatbuffers::Verifiable,
35 + T: flatbuffers::Follow<'a> + flatbuffers::Verifiable + 'a,
36 S: std::convert::From<T::Inner>,
38 flatbuffers::root::<T>(buf).unwrap().into()
39 diff --git a/flux-core/src/semantic/nodes.rs b/flux-core/src/semantic/nodes.rs
40 index 3213991..f64dbd4 100644
41 --- a/flux-core/src/semantic/nodes.rs
42 +++ b/flux-core/src/semantic/nodes.rs
43 @@ -822,9 +822,8 @@ impl VariableAssgn {
45 // Note these variables are fixed after generalization
46 // and so it is safe to update these nodes in place.
47 - self.vars = p.vars.clone();
48 - self.cons = p.cons.clone();
50 + self.vars.clone_from(&p.vars);
51 + self.cons.clone_from(&p.cons);
52 // Update the type environment
53 infer.env.add(self.id.name.clone(), p);
54 Ok(())
55 diff --git a/flux-core/src/semantic/sub.rs b/flux-core/src/semantic/sub.rs
56 index 2ca73e0..1431565 100644
57 --- a/flux-core/src/semantic/sub.rs
58 +++ b/flux-core/src/semantic/sub.rs
59 @@ -481,7 +481,7 @@ where
62 #[allow(clippy::too_many_arguments, clippy::type_complexity)]
63 -pub(crate) fn merge4<A: ?Sized, B: ?Sized, C: ?Sized, D: ?Sized>(
64 +pub(crate) fn merge4<A, B, C, D>(
65 a_original: &A,
66 a: Option<A::Owned>,
67 b_original: &B,
68 @@ -492,10 +492,10 @@ pub(crate) fn merge4<A: ?Sized, B: ?Sized, C: ?Sized, D: ?Sized>(
69 d: Option<D::Owned>,
70 ) -> Option<(A::Owned, B::Owned, C::Owned, D::Owned)>
71 where
72 - A: ToOwned,
73 - B: ToOwned,
74 - C: ToOwned,
75 - D: ToOwned,
76 + A: ToOwned + ?Sized,
77 + B: ToOwned + ?Sized,
78 + C: ToOwned + ?Sized,
79 + D: ToOwned + ?Sized,
81 let a_b_c = merge3(a_original, a, b_original, b, c_original, c);
82 merge_fn(
83 @@ -515,7 +515,7 @@ where
84 .map(|((a, b, c), d)| (a, b, c, d))
87 -pub(crate) fn merge3<A: ?Sized, B: ?Sized, C: ?Sized>(
88 +pub(crate) fn merge3<A, B, C>(
89 a_original: &A,
90 a: Option<A::Owned>,
91 b_original: &B,
92 @@ -524,9 +524,9 @@ pub(crate) fn merge3<A: ?Sized, B: ?Sized, C: ?Sized>(
93 c: Option<C::Owned>,
94 ) -> Option<(A::Owned, B::Owned, C::Owned)>
95 where
96 - A: ToOwned,
97 - B: ToOwned,
98 - C: ToOwned,
99 + A: ToOwned + ?Sized,
100 + B: ToOwned + ?Sized,
101 + C: ToOwned + ?Sized,
103 let a_b = merge(a_original, a, b_original, b);
104 merge_fn(
105 @@ -542,15 +542,15 @@ where
107 /// Merges two values using `f` if either or both them is `Some(..)`.
108 /// If both are `None`, `None` is returned.
109 -pub(crate) fn merge<A: ?Sized, B: ?Sized>(
110 +pub(crate) fn merge<A, B>(
111 a_original: &A,
112 a: Option<A::Owned>,
113 b_original: &B,
114 b: Option<B::Owned>,
115 ) -> Option<(A::Owned, B::Owned)>
116 where
117 - A: ToOwned,
118 - B: ToOwned,
119 + A: ToOwned + ?Sized,
120 + B: ToOwned + ?Sized,
122 merge_fn(a_original, A::to_owned, a, b_original, B::to_owned, b)
124 diff --git a/flux-core/src/semantic/types.rs b/flux-core/src/semantic/types.rs
125 index 6a0e292..685475a 100644
126 --- a/flux-core/src/semantic/types.rs
127 +++ b/flux-core/src/semantic/types.rs
128 @@ -1327,7 +1327,7 @@ fn collect_record(record: &Record) -> (RefMonoTypeVecMap<'_, RecordLabel>, Optio
130 let mut fields = record.fields();
131 for field in &mut fields {
132 - a.entry(&field.k).or_insert_with(Vec::new).push(&field.v);
133 + a.entry(&field.k).or_default().push(&field.v);
135 (a, fields.tail())
137 @@ -1812,7 +1812,7 @@ impl PartialEq<&str> for Label {
139 impl PartialOrd for Label {
140 fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
141 - self.0.name().partial_cmp(other.0.name())
142 + Some(self.cmp(other))
146 @@ -2198,6 +2198,7 @@ impl Function {
147 pub(crate) trait TypeLike {
148 type Error;
149 fn typ(&self) -> &MonoType;
150 + #[allow(dead_code)]
151 fn into_type(self) -> MonoType;
152 fn error(&self, error: Error) -> Self::Error;
154 diff --git a/go/libflux/buildinfo.gen.go b/go/libflux/buildinfo.gen.go
155 index 2d13f4a..266f493 100644
156 --- a/go/libflux/buildinfo.gen.go
157 +++ b/go/libflux/buildinfo.gen.go
158 @@ -10,6 +10,7 @@ package libflux
159 // and forces the cgo library to rebuild and relink
160 // the sources. This is because non-C/C++ sources
161 // are not tracked by Go's build system.'
163 //lint:ignore U1000 generated code
164 var sourceHashes = map[string]string{
165 "libflux/Cargo.lock": "ec8537d38afbe08ecf451990b8c0a84ee4b30ee66d440d6525832c769764e44e",
166 @@ -41,17 +42,17 @@ var sourceHashes = map[string]string{
167 "libflux/flux-core/src/semantic/env.rs": "8da036aa5f0e09f94fd2461687e97131068e56c762bef8cd98cfd91f36ef3e98",
168 "libflux/flux-core/src/semantic/flatbuffers/mod.rs": "270671ffdcb1eb5308f9bbab0431c9464df264070a2deb05c526d182a6ec5585",
169 "libflux/flux-core/src/semantic/flatbuffers/semantic_generated.rs": "beaaa6b08d8b56dba81153a58e440bbdc430b4eca0201a3431e90b793f1adbce",
170 - "libflux/flux-core/src/semantic/flatbuffers/types.rs": "029d51104eb4a0bbfc8d82a470e0f2915a27d7cb00c08a3f35e638b5a3105fc2",
171 + "libflux/flux-core/src/semantic/flatbuffers/types.rs": "c378f78c87464d9ecd4dc86b4808c0268e3968adf3def0170c77ce78bb0200c9",
172 "libflux/flux-core/src/semantic/formatter/mod.rs": "8dd34520750a39ad242adfbb68c38a170d56bad82d5ccf80b165f0977ea68289",
173 "libflux/flux-core/src/semantic/fresh.rs": "97238fbc317e7c51836a6ba3441d641d9f4f8c7f637bde4bccbd0e09146129d0",
174 "libflux/flux-core/src/semantic/fs.rs": "f7f609bc8149769d99b737150e184a2d54029c0b768365dbcf08ff193b0e1f6f",
175 "libflux/flux-core/src/semantic/import.rs": "184e955211db1ceb1be782b4daf75584b86907b1428e50015497909cfc2dd89a",
176 "libflux/flux-core/src/semantic/infer.rs": "9d4293f2471a90cc89c1e45cdc72082e0da1a484981b803aea05856e6b4d722f",
177 "libflux/flux-core/src/semantic/mod.rs": "a70c32d73f0053e4a3eda7ad23626252cf6420b5db8b440a7351c2f62aa7a948",
178 - "libflux/flux-core/src/semantic/nodes.rs": "23ee2dec99b71f0fe81987528b3dfbd95e89d77a274ccc8a0baa146dea89ad51",
179 - "libflux/flux-core/src/semantic/sub.rs": "a989e50c113ca899fe02f8d49a4744a420580a3f803f656db25beb2d0c2a247b",
180 + "libflux/flux-core/src/semantic/nodes.rs": "d5bff77bcb3de0e730b2a3f6d1245a12c718dfe3b8ecf937532330d2579ab53f",
181 + "libflux/flux-core/src/semantic/sub.rs": "618713f4d14e9e2674204a9d293600692213327e77842cbe973c7b1715e23f24",
182 "libflux/flux-core/src/semantic/symbols.rs": "ddbceca632ca384c6bb461a660e02781c43295025f2dd10f1ea997131dd5eb30",
183 - "libflux/flux-core/src/semantic/types.rs": "ed414b695e925f18f74984ec88bba652ef8dd8c9e905cb9e8fa19b101a4601b4",
184 + "libflux/flux-core/src/semantic/types.rs": "ae9cdcff357d217c0f744769a95b9f3bf55083f923df0c235f52de2b40be8f74",
185 "libflux/flux-core/src/semantic/vectorize.rs": "6ce2dc4e6ff572abc0146a220291322ea88557ce674ae16220a2d67420e9fa0d",
186 "libflux/flux-core/src/semantic/walk/_walk.rs": "c3d04e72cfbe595d4919b84f4df4bc6c55297516cf8e12e6cb691f48be648291",
187 "libflux/flux-core/src/semantic/walk/mod.rs": "f71aac086dd1d7b730e24bac690a3e47a9bfe575cd6cba499af67db9b920c726",
189 2.46.0