superlistapp / super_native_extensions

Native drag & drop, clipboard access and context menu.
MIT License
460 stars 84 forks source link

Rust errors on flutter build apk --release #142

Closed LucasMW closed 1 year ago

LucasMW commented 1 year ago

I get several rust errors when trying run flutter build apk

flutter build apk --release ``` 💪 Building with sound null safety 💪 Finished dev [unoptimized + debuginfo] target(s) in 0.07s Running `/Users/lmenezes/flutter_projects/pixel_vision/build/super_native_extensions/build/rust_tool/debug/build_tool build_android` Running Gradle task 'assembleRelease'... error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:201:24 | 201 | if let Err(new_queue) = exchange { | ^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:236:16 | 236 | if let Err(new_queue) = exchange { | ^^^ not found in this scope error[E0405]: cannot find trait `Sized` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:260:12 | 260 | T: Sized, | ^^^^^ not found in this scope error[E0405]: cannot find trait `Sized` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:272:12 | 272 | T: Sized, | ^^^^^ not found in this scope error[E0405]: cannot find trait `Sized` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:293:12 | 293 | T: Sized, | ^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:291:52 | 291 | pub(crate) fn map_addr(ptr: *mut T, f: impl FnOnce(usize) -> usize) -> *mut T | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:380:27 | 380 | inner: UnsafeCell>, | ^^^^^^ not found in this scope error[E0405]: cannot find trait `Default` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:390:13 | 390 | impl Default for OnceCell { | ^^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:399:17 | 399 | Some(v) => f.debug_tuple("OnceCell").field(v).finish(), | ^^^^ not found in this scope error[E0405]: cannot find trait `Clone` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:405:20 | 405 | impl Clone for OnceCell { | ^^^^^ not found in this scope error[E0405]: cannot find trait `Clone` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:405:13 | 405 | impl Clone for OnceCell { | ^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:408:17 | 408 | Some(value) => OnceCell::with_value(value.clone()), | ^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:415:18 | 415 | (Some(this), Some(source)) => this.clone_from(source), | ^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:415:30 | 415 | (Some(this), Some(source)) => this.clone_from(source), | ^^^^ not found in this scope error[E0405]: cannot find trait `PartialEq` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:421:24 | 421 | impl PartialEq for OnceCell { | ^^^^^^^^^ not found in this scope error[E0405]: cannot find trait `PartialEq` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:421:13 | 421 | impl PartialEq for OnceCell { | ^^^^^^^^^ not found in this scope error[E0405]: cannot find trait `Eq` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:427:17 | 427 | impl Eq for OnceCell {} | ^^ not found in this scope error[E0405]: cannot find trait `Eq` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:427:13 | 427 | impl Eq for OnceCell {} | ^^ not found in this scope error[E0405]: cannot find trait `From` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:429:13 | 429 | impl From for OnceCell { | ^^^^ not found in this scope error[E0425]: cannot find value `None` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:438:47 | 438 | OnceCell { inner: UnsafeCell::new(None) } | ^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:450:30 | 450 | pub fn get(&self) -> Option<&T> { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:472:38 | 472 | pub fn get_mut(&mut self) -> Option<&mut T> { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:494:40 | 494 | pub fn set(&self, value: T) -> Result<(), T> { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:496:17 | 496 | Ok(_) => Ok(()), | ^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:497:17 | 497 | Err((_, value)) => Err(value), | ^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:515:47 | 515 | pub fn try_insert(&self, value: T) -> Result<&T, (&T, T)> { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:516:20 | 516 | if let Some(old) = self.get() { | ^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:552:16 | 552 | F: FnOnce() -> T, | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:556:17 | 556 | Ok(val) => val, | ^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:557:17 | 557 | Err(void) => match void {}, | ^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:588:16 | 588 | F: FnOnce() -> Result, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:588:28 | 588 | F: FnOnce() -> Result, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:586:54 | 586 | pub fn get_or_try_init(&self, f: F) -> Result<&T, E> | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:590:20 | 590 | if let Some(val) = self.get() { | ^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:631:35 | 631 | pub fn take(&mut self) -> Option { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:651:36 | 651 | pub fn into_inner(self) -> Option { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:680:20 | 680 | init: Cell>, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:713:48 | 713 | pub fn into_value(this: Lazy) -> Result { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:722:16 | 722 | impl T> Lazy { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:739:17 | 739 | Some(f) => f(), | ^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:776:42 | 776 | pub fn get(this: &Lazy) -> Option<&T> { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:793:50 | 793 | pub fn get_mut(this: &mut Lazy) -> Option<&mut T> { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:798:16 | 798 | impl T> Deref for Lazy { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:805:16 | 805 | impl T> DerefMut for Lazy { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `Default` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:812:22 | 812 | impl Default for Lazy { | ^^^^^^^ not found in this scope error[E0405]: cannot find trait `Default` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:812:13 | 812 | impl Default for Lazy { | ^^^^^^^ not found in this scope error[E0405]: cannot find trait `Default` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:862:13 | 862 | impl Default for OnceCell { | ^^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:871:17 | 871 | Some(v) => f.debug_tuple("OnceCell").field(v).finish(), | ^^^^ not found in this scope error[E0405]: cannot find trait `Clone` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:877:20 | 877 | impl Clone for OnceCell { | ^^^^^ not found in this scope error[E0405]: cannot find trait `Clone` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:877:13 | 877 | impl Clone for OnceCell { | ^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:880:17 | 880 | Some(value) => Self::with_value(value.clone()), | ^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:887:18 | 887 | (Some(this), Some(source)) => this.clone_from(source), | ^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:887:30 | 887 | (Some(this), Some(source)) => this.clone_from(source), | ^^^^ not found in this scope error[E0405]: cannot find trait `From` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:893:13 | 893 | impl From for OnceCell { | ^^^^ not found in this scope error[E0405]: cannot find trait `PartialEq` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:899:24 | 899 | impl PartialEq for OnceCell { | ^^^^^^^^^ not found in this scope error[E0405]: cannot find trait `PartialEq` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:899:13 | 899 | impl PartialEq for OnceCell { | ^^^^^^^^^ not found in this scope error[E0405]: cannot find trait `Eq` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:905:17 | 905 | impl Eq for OnceCell {} | ^^ not found in this scope error[E0405]: cannot find trait `Eq` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:905:13 | 905 | impl Eq for OnceCell {} | ^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:922:30 | 922 | pub fn get(&self) -> Option<&T> { | ^^^^^^ not found in this scope error[E0425]: cannot find value `None` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:927:17 | 927 | None | ^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:978:38 | 978 | pub fn get_mut(&mut self) -> Option<&mut T> { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1017:40 | 1017 | pub fn set(&self, value: T) -> Result<(), T> { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1019:17 | 1019 | Ok(_) => Ok(()), | ^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1020:17 | 1020 | Err((_, value)) => Err(value), | ^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1039:47 | 1039 | pub fn try_insert(&self, value: T) -> Result<&T, (&T, T)> { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1044:17 | 1044 | Some(value) => Err((res, value)), | ^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1076:16 | 1076 | F: FnOnce() -> T, | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1080:17 | 1080 | Ok(val) => val, | ^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1081:17 | 1081 | Err(void) => match void {}, | ^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1113:16 | 1113 | F: FnOnce() -> Result, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1113:28 | 1113 | F: FnOnce() -> Result, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1111:54 | 1111 | pub fn get_or_try_init(&self, f: F) -> Result<&T, E> | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1116:20 | 1116 | if let Some(value) = self.get() { | ^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1156:35 | 1156 | pub fn take(&mut self) -> Option { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1176:36 | 1176 | pub fn into_inner(self) -> Option { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1216:20 | 1216 | init: Cell>, | ^^^^^^ not found in this scope error[E0405]: cannot find trait `Sync` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1229:29 | 1229 | unsafe impl Sync for Lazy where OnceCell: Sync {} | ^^^^ not found in this scope error[E0405]: cannot find trait `Send` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1229:23 | 1229 | unsafe impl Sync for Lazy where OnceCell: Sync {} | ^^^^ not found in this scope error[E0405]: cannot find trait `Sync` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1229:68 | 1229 | unsafe impl Sync for Lazy where OnceCell: Sync {} | ^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1244:48 | 1244 | pub fn into_value(this: Lazy) -> Result { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1253:16 | 1253 | impl T> Lazy { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1269:17 | 1269 | Some(f) => f(), | ^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1304:42 | 1304 | pub fn get(this: &Lazy) -> Option<&T> { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1321:50 | 1321 | pub fn get_mut(this: &mut Lazy) -> Option<&mut T> { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1326:16 | 1326 | impl T> Deref for Lazy { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1333:16 | 1333 | impl T> DerefMut for Lazy { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `Default` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1340:22 | 1340 | impl Default for Lazy { | ^^^^^^^ not found in this scope error[E0405]: cannot find trait `Default` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1340:13 | 1340 | impl Default for Lazy { | ^^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:45:26 | 45 | pub fn get(&self) -> Option { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:55:47 | 55 | pub fn set(&self, value: NonZeroUsize) -> Result<(), ()> { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:59:13 | 59 | Ok(_) => Ok(()), | ^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:60:13 | 60 | Err(_) => Err(()), | ^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:72:12 | 72 | F: FnOnce() -> NonZeroUsize, | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:76:13 | 76 | Ok(val) => val, | ^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:77:13 | 77 | Err(void) => match void {}, | ^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:90:12 | 90 | F: FnOnce() -> Result, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:90:24 | 90 | F: FnOnce() -> Result, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:88:50 | 88 | pub fn get_or_try_init(&self, f: F) -> Result | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:94:13 | 94 | Some(it) => it, | ^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:99:24 | 99 | if let Err(old) = exchange { | ^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:124:26 | 124 | pub fn get(&self) -> Option { | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:133:39 | 133 | pub fn set(&self, value: bool) -> Result<(), ()> { | ^^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:145:12 | 145 | F: FnOnce() -> bool, | ^^^^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:159:12 | 159 | F: FnOnce() -> Result, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:159:24 | 159 | F: FnOnce() -> Result, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:157:50 | 157 | pub fn get_or_try_init(&self, f: F) -> Result | ^^^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:188:28 | 188 | ghost: PhantomData>>, | ^^^^^^ not found in this scope error[E0405]: cannot find trait `Default` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:197:13 | 197 | impl Default for OnceBox { | ^^^^^^^ not found in this scope error[E0405]: cannot find trait `Drop` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:203:13 | 203 | impl Drop for OnceBox { | ^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:219:30 | 219 | pub fn get(&self) -> Option<&T> { | ^^^^^^ not found in this scope error[E0425]: cannot find value `None` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:222:24 | 222 | return None; | ^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:231:45 | 231 | pub fn set(&self, value: Box) -> Result<(), Box> { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:239:20 | 239 | if let Err(_) = exchange { | ^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:254:16 | 254 | F: FnOnce() -> Box, | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:258:17 | 258 | Ok(val) => val, | ^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:259:17 | 259 | Err(void) => match void {}, | ^^^ not found in this scope error[E0405]: cannot find trait `FnOnce` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:272:16 | 272 | F: FnOnce() -> Result, E>, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:272:28 | 272 | F: FnOnce() -> Result, E>, | ^^^^^^ not found in this scope error[E0412]: cannot find type `Result` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:270:54 | 270 | pub fn get_or_try_init(&self, f: F) -> Result<&T, E> | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:285:24 | 285 | if let Err(old) = exchange { | ^^^ not found in this scope error[E0405]: cannot find trait `Sync` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:294:33 | 294 | unsafe impl Sync for OnceBox {} | ^^^^ not found in this scope error[E0405]: cannot find trait `Sync` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:294:20 | 294 | unsafe impl Sync for OnceBox {} | ^^^^ not found in this scope error[E0405]: cannot find trait `Send` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:294:27 | 294 | unsafe impl Sync for OnceBox {} | ^^^^ not found in this scope error[E0412]: cannot find type `Option` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1370:36 | 1370 | unsafe fn unwrap_unchecked(val: Option) -> T { | ^^^^^^ not found in this scope error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1372:9 | 1372 | Some(value) => value, | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:53:36 | 53 | value: UnsafeCell::new(Some(value)), | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:75:21 | 75 | let mut f = Some(f); | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:76:38 | 76 | let mut res: Result<(), E> = Ok(()); | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:80:13 | 80 | Some(&mut || { | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:84:42 | 84 | unsafe { *slot = Some(value) }; | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:88:31 | 88 | res = Err(err); | ^^^ help: a local variable with a similar name exists: `err` error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/imp_std.rs:224:31 | 224 | thread: Cell::new(Some(thread::current())), | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:443:47 | 443 | OnceCell { inner: UnsafeCell::new(Some(value)) } | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:496:26 | 496 | Ok(_) => Ok(()), | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:497:36 | 497 | Err((_, value)) => Err(value), | ^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:517:24 | 517 | return Err((old, value)); | ^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:525:21 | 525 | *slot = Some(value); | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:526:13 | 526 | Ok(unsafe { unwrap_unchecked(slot.as_ref()) }) | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:555:43 | 555 | match self.get_or_try_init(|| Ok::(f())) { | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:591:24 | 591 | return Ok(val); | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:599:13 | 599 | Ok(unsafe { unwrap_unchecked(self.get()) }) | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:707:59 | 707 | Lazy { cell: OnceCell::new(), init: Cell::new(Some(init)) } | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:925:17 | 925 | Some(unsafe { self.get_unchecked() }) | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1019:26 | 1019 | Ok(_) => Ok(()), | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1020:36 | 1020 | Err((_, value)) => Err(value), | ^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1040:29 | 1040 | let mut value = Some(value); | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1043:25 | 1043 | None => Ok(res), | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1044:32 | 1044 | Some(value) => Err((res, value)), | ^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1079:43 | 1079 | match self.get_or_try_init(|| Ok::(f())) { | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1117:24 | 1117 | return Ok(value); | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1124:13 | 1124 | Ok(unsafe { self.get_unchecked() }) | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/lib.rs:1238:59 | 1238 | Lazy { cell: OnceCell::new(), init: Cell::new(Some(f)) } | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:59:22 | 59 | Ok(_) => Ok(()), | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:60:23 | 60 | Err(_) => Err(()), | ^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:75:39 | 75 | match self.get_or_try_init(|| Ok::(f())) { | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:105:9 | 105 | Ok(res) | ^^ not found in this scope error[E0425]: cannot find function `drop` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:207:17 | 207 | drop(unsafe { Box::from_raw(ptr) }) | ^^^^ not found in this scope | help: consider using the associated function | 207 | self.drop(unsafe { Box::from_raw(ptr) }) | +++++ error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:224:13 | 224 | Some(unsafe { &*ptr }) | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:241:24 | 241 | return Err(value); | ^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:243:13 | 243 | Ok(()) | ^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:257:43 | 257 | match self.get_or_try_init(|| Ok::, Void>(f())) { | ^^ not found in this scope error[E0425]: cannot find function `drop` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:286:21 | 286 | drop(unsafe { Box::from_raw(ptr) }); | ^^^^ not found in this scope error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope --> /Users/lmenezes/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.16.0/src/race.rs:290:13 | 290 | Ok(unsafe { &*ptr }) | ^^ not found in this scope Some errors have detailed explanations: E0405, E0408, E0412, E0425, E0432, E0463, E0531. error: could not compile `once_cell` due to 219 previous errors stdout: FAILURE: Build failed with an exception. * Where: Script '/Users/lmenezes/.pub-cache/hosted/pub.dev/super_native_extensions-0.4.0/cargokit/gradle/plugin.gradle' line: 57 * What went wrong: Execution failed for task ':super_native_extensions:cargokitCargoBuildSuper_native_extensionsRelease'. > Process 'command '/Users/lmenezes/.pub-cache/hosted/pub.dev/super_native_extensions-0.4.0/cargokit/gradle/../run_rust_tool.sh'' finished with non-zero exit value 1 * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 30s Running Gradle task 'assembleRelease'... 33.9s Gradle task assembleRelease failed with exit code 1````
knopp commented 1 year ago

This looks like a toolchain target not installed, which is weird because the android build command should do just that.

Can you post there result of rustup toolchain list and rustup target list?

LucasMW commented 1 year ago

I tried to upgrade my rust today, so the results now are not the same as they were yesterday:

rustup target list

aarch64-apple-darwin (installed)
aarch64-apple-ios (installed)
aarch64-apple-ios-sim
aarch64-linux-android (installed)
aarch64-pc-windows-msvc
aarch64-unknown-fuchsia
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
aarch64-unknown-none
aarch64-unknown-none-softfloat
aarch64-unknown-uefi
arm-linux-androideabi
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
arm-unknown-linux-musleabi
arm-unknown-linux-musleabihf
armebv7r-none-eabi
armebv7r-none-eabihf
armv5te-unknown-linux-gnueabi
armv5te-unknown-linux-musleabi
armv7-linux-androideabi (installed)
armv7-unknown-linux-gnueabi
armv7-unknown-linux-gnueabihf
armv7-unknown-linux-musleabi
armv7-unknown-linux-musleabihf
armv7a-none-eabi
armv7r-none-eabi
armv7r-none-eabihf
asmjs-unknown-emscripten
i586-pc-windows-msvc
i586-unknown-linux-gnu
i586-unknown-linux-musl
i686-linux-android
i686-pc-windows-gnu
i686-pc-windows-msvc
i686-unknown-freebsd
i686-unknown-linux-gnu
i686-unknown-linux-musl
i686-unknown-uefi
mips-unknown-linux-gnu
mips-unknown-linux-musl
mips64-unknown-linux-gnuabi64
mips64-unknown-linux-muslabi64
mips64el-unknown-linux-gnuabi64
mips64el-unknown-linux-muslabi64
mipsel-unknown-linux-gnu
mipsel-unknown-linux-musl
nvptx64-nvidia-cuda
powerpc-unknown-linux-gnu
powerpc64-unknown-linux-gnu
powerpc64le-unknown-linux-gnu
riscv32i-unknown-none-elf
riscv32imac-unknown-none-elf
riscv32imc-unknown-none-elf
riscv64gc-unknown-linux-gnu
riscv64gc-unknown-none-elf
riscv64imac-unknown-none-elf
s390x-unknown-linux-gnu
sparc64-unknown-linux-gnu
sparcv9-sun-solaris
thumbv6m-none-eabi
thumbv7em-none-eabi
thumbv7em-none-eabihf
thumbv7m-none-eabi
thumbv7neon-linux-androideabi
thumbv7neon-unknown-linux-gnueabihf
thumbv8m.base-none-eabi
thumbv8m.main-none-eabi
thumbv8m.main-none-eabihf
wasm32-unknown-emscripten
wasm32-unknown-unknown
wasm32-wasi
x86_64-apple-darwin (installed)
x86_64-apple-ios
x86_64-fortanix-unknown-sgx
x86_64-linux-android (installed)
x86_64-pc-solaris
x86_64-pc-windows-gnu
x86_64-pc-windows-msvc
x86_64-sun-solaris
x86_64-unknown-freebsd
x86_64-unknown-fuchsia
x86_64-unknown-illumos
x86_64-unknown-linux-gnu
x86_64-unknown-linux-gnux32
x86_64-unknown-linux-musl
x86_64-unknown-netbsd
x86_64-unknown-none
x86_64-unknown-redox
x86_64-unknown-uefi

rustup toolchain list

stable-x86_64-apple-darwin (default)

LucasMW commented 1 year ago

Couldn't make it work on iOS either. Serveral rust errors too.

However, I was able to make it run on fluttter run -d macos

knopp commented 1 year ago

Is it possible that you have installed rust through homebrew? If so please uninstall it. Homebrew rust installation is broken as it doesn't support any other toolchains through rust-up. I think super_native_extensions installs the toolchain through rustup but than invokes homebrew cargo because it's further up in PATH. That should be easy to fix.

LucasMW commented 1 year ago

Yes, I have rust through homebrew. Ok I will try what you say and report the results

LucasMW commented 1 year ago

Re-installed rust. I was able to run on iOS now. Android however still has issues. Searching the internet, it appears to do with the NDK version (?)

Here's the log:

flutter build apk --release

💪 Building with sound null safety 💪

Finished dev [unoptimized + debuginfo] target(s) in 0.52s
 Running `/Users/lmenezes/flutter_projects/pixel_vision/build/super_native_extensions/build/rust_tool/debug/build_tool build_android`

Build tool failed: Command AR_armv7-linux-androideabi="/Users/lmenezes/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar" CARGO_ENCODED_RUSTFLAGS="-L\u{1f}/Users/lmenezes/flutter_projects/pixel_vision/build/super_native_extensions/build/cargokit/libgcc_workaround/23" CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="/Users/lmenezes/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang" CC_armv7-linux-androideabi="/Users/lmenezes/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang" CXX_armv7-linux-androideabi="/Users/lmenezes/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang++" "cargo" "build" "--manifest-path" "/Users/lmenezes/.pub-cache/hosted/pub.dev/super_native_extensions-0.4.0/android/../rust/Cargo.toml" "-p" "super_native_extensions" "--release" "--target" "armv7-linux-androideabi" "--target-dir" "/Users/lmenezes/flutter_projects/pixel_vision/build/super_native_extensions/build" failed with error exit status: 101; stderr: Downloading crates ... Downloaded android_logger v0.11.0 Downloaded same-file v1.0.6 Downloaded android_log-sys v0.2.0 Downloaded combine v4.6.3 Downloaded jni v0.19.0 Downloaded thiserror-impl v1.0.31 Downloaded bytes v1.1.0 Downloaded regex-syntax v0.6.25 Downloaded env_logger v0.9.0 Downloaded aho-corasick v0.7.18 Downloaded jni-sys v0.3.0 Downloaded walkdir v2.3.2 Downloaded thiserror v1.0.31 Downloaded regex v1.5.5 Downloaded irondash_jni_context v0.1.2 Downloaded cesu8 v1.1.0 Compiling super_native_extensions v0.1.0 (/Users/lmenezes/.pub-cache/hosted/pub.dev/super_native_extensions-0.4.0/rust) error: linker /Users/lmenezes/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi16-clang not found | = note: No such file or directory (os error 2)

error: could not compile super_native_extensions (lib) due to previous error

stdout:

FAILURE: Build failed with an exception.

  • Where: Script '/Users/lmenezes/.pub-cache/hosted/pub.dev/super_native_extensions-0.4.0/cargokit/gradle/plugin.gradle' line: 57

  • What went wrong: Execution failed for task ':super_native_extensions:cargokitCargoBuildSuper_native_extensionsRelease'.

    Process 'command '/Users/lmenezes/.pub-cache/hosted/pub.dev/super_native_extensions-0.4.0/cargokit/gradle/../run_rust_tool.sh'' finished with non-zero exit value 1

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 35s

knopp commented 1 year ago

Do you have ndk version 25.2.9519653 installed?

LucasMW commented 1 year ago
image

Yep

knopp commented 1 year ago

Nevermind. You need to set minSdkVersion in your build.gradle to something that the NDK supports. In this case that would be 19 (or newer).

LucasMW commented 1 year ago

How do I know which version of NDK and android should I use? Isn't this the most recent NDK? Which NDK version did/do you use for this?

By the way, tried with 19 and flutter said that this lib requires at least 23.

Generated an APK file, finally.

knopp commented 1 year ago

Every NDK has minimum version that it can target. But that's usually lower that what flutter requires anyway. The version of NDK depends on what you set in your application build.gradle.

knopp commented 1 year ago

Closing this. The rustup cargo should now be preferred and NDK installed automatically.