superlistapp / super_native_extensions Goto Github PK
View Code? Open in Web Editor NEWNative drag & drop, clipboard access and context menu.
License: MIT License
Native drag & drop, clipboard access and context menu.
License: MIT License
Reader should try to open the file in place if possible.
drop region code in readme.md has typo
class MyDropRegion extends StatelessWidget {
@override
Widget build(BuildContext context) {
return DropRegion(
// Formats this region can accept.
formats: Formats.standardFormats,
hitTestBehavior: HitTestBehavior.opaque,
onDropOver: (event) {
// You can inspect local data here, as well as formats of each item.
// However on certain platforms (mobile / web) the actual data is
// only available when the drop is accepted (onPerformDrop).
final item = event.session.items.first;
if (item.localData is Map) {
// This is a drag within the app and has custom local data set.
}
if (item.canProvide(Formats.plainText)) {
// this item contains plain text.
}
// This drop region only supports copy operation.
if (event.session.allowedOperations.contains(DropOperation.copy)) {
return DropOperation.copy;
} else {
return DropOperation.none;
}
},
onDropEnter: (event) {
// This is called when region first accepts a drag. You can use this
// to display a visual indicator that the drop is allowed.
},
onDropLeave: (event) {
// Called when drag leaves the region. Will also be called after
// drag completion.
// This is a good place to remove any visual indicators.
},
onPerformDrop: (event) async {
// Called when user dropped the item. You can now request the data.
// Note that data must be requested before the performDrop callback
// is over.
final item = event.session.items.first;
// data reader is available now
final reader = item.dataReader!;
if (reader.canProvide(Formats.plainText)) {
reader.getValue<String>(Formats.plainText, (value) {
if (value != null) {
// You can access values through the `value` property.
print('Dropped text: ${value}');
}
}, onError: (error) {
print('Error reading value $error');
});
}
if (reader.canProvide(Formats.png)) {
reader.getFile(Formats.png, (file) {
// Binary files may be too large to be loaded in memory and thus
// are exposed as stream.
final stream = file.getStream();
// Alternatively, if you know that that the value is small enough,
// you can read the entire value into memory:
// (note that readAll is mutually exclusive with getStream(), you
// can only use one of them)
// final data = file.readAll();
}, onError: (error) {
print('Error reading value $error');
});
}
},
child: const Padding(
padding: EdgeInsets.all(15.0),
child: Text('Drop items here'),
),
);
}
}
Files from Desktop can be readed using:
onPerformDrop: (event) async {
final item = event.session.items.first;
// data reader is available now
final reader = item.dataReader!;
if (reader.canProvide(Formats.fileUri)) {
reader.getValue<Uri>(
Formats.fileUri,
(value) async {
if (value != null) {
// You can access values through the `value` property.
print('Dropped text: $value');
print(value.toFilePath());
}
},
onError: (error) {
print('Error reading value $error');
},
);
}
},
But for Files Dragged from Outlook (Desktop client) it does not support Formats.fileUri
format
On Windows it works fine in booth cases. What am I doing wrong?
hello , our team is really appreciate for your plugin
we had an issue , when you use ContextMenuWidget
on any scroll-able widgets 'listview, listview.builder ... ect' , the context menu is not working
tested on:
device : 'Iphone x & Iphone 13'
OS: 'IOS 16.3.1 & IOS 16.3.0 '
test code:
Scaffold( body: ListView( children: [ Container( child: ContextMenuWidget( child: const SizedBox( width: 200, height: 200, child: Text('Basefdf Context Menu'), ), menuProvider: (_) { return Menu( children: [ MenuAction(title: 'Menu Item 2', callback: () {}), MenuAction(title: 'Menu Item 3', callback: () {}), ], ); }, ), ), Container( child: ContextMenuWidget( child: const SizedBox( width: 200, height: 200, child: Text('Basefdf Context Menu'), ), menuProvider: (_) { return Menu( children: [ MenuAction(title: 'Menu Item 2', callback: () {}), MenuAction(title: 'Menu Item 3', callback: () {}), ], ); }, ), ) ], ), )
Hi Guys,
was testing out the super,_clipboard plugin, i ran your example and did all settings, but on android i get this error when compiling
Compiling build_tool v0.1.0 (C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\super_native_extensions-0.1.8+1\cargokit\build_tool) Finished dev [unoptimized + debuginfo] target(s) in 4.09s Running
C:\Users\Ernesto\Documents\Custom\debug\build_tool.exe Packages\super_native_extensions\super_clipboard\example\build\super_native_extensions/build/rust_tool -- build_androidBuild tool failed: Invalid command: Packages\super_native_extensions\super_clipboard\example\build\super_native_extensions/build/rust_tool error: process didn't exit successfully:
C:\Users\Documents\Custom\debug\build_tool.exe Packages\super_native_extensions\super_clipboard\example\build\super_native_extensions/build/rust_tool -- build_android (exit code: 1)
I am not sure what is giving it this error. Can you assist? @knopp
I've install rust:
cargo --version
cargo 1.69.0 (6e9a83356 2023-04-12)
rustc --version
rustc 1.69.0 (84c898d65 2023-04-16)
android {
compileSdkVersion 33
ndkVersion "25.2.9519653"
...
But when I build the project, I faced the issue, even I had invalidated cache and restarted Android Studio:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
INFO: Could not find files for the given pattern(s).
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\ThinhDev\AppData\Local\Pub\Cache\hosted\pub.dev\super_native_extensions-0.3.0+2\cargokit\gradle\plugin.gradle' line: 57
What went wrong:
Execution failed for task ':super_native_extensions:cargokitCargoBuildSuper_native_extensionsDebug'.
Process 'command 'C:\Users\ThinhDev\AppData\Local\Pub\Cache\hosted\pub.dev\super_native_extensions-0.3.0+2\cargokit\gradle..\run_rust_tool.cmd'' 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 18s
cargo not found!
Maybe you need to install Rust? It only takes a minute:
https://www.rust-lang.org/tools/install
Exception: Gradle task assembleDebug failed with exit code 1
Hey Matej,
we use the NSWindow method isMovable
to be able to move our application by its titlebar. Since we have been using your plugin (super_drag_and_drop), this no longer works after resizing the window.
I'm using this package to copy a table with information to be pasted in e-mail body and when I run locally its works fine, but when I deploy to firebase hosting I get this error. I try with Chrome and Edge
TypeError: Failed to execute 'write' on 'Clipboard': The object must have a callable @@iterator property.
* Where:
Script '/Users/hatemragap/flutter/.pub-cache/hosted/pub.dartlang.org/super_native_extensions-0.1.6/toolbox/gradle/plugin.gradle' line: 129
* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin class 'ToolboxPlugin'.
> It is too late to set ndkVersion
It has already been read to configure this project.
Consider either moving this call to be during evaluation,
or using the variant API.
Hovering over a Link widget inside a DropRegion immediately calls onDropEnter
, onDropLeave
, and then onDropEnded
import 'package:flutter/material.dart';
import 'package:super_drag_and_drop/super_drag_and_drop.dart';
import 'package:url_launcher/link.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(
scaffoldBackgroundColor: darkBlue,
),
debugShowCheckedModeBanner: false,
home: const Scaffold(
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatefulWidget {
const MyWidget({super.key});
@override
State<MyWidget> createState() => _MyWidgetState();
}
class _MyWidgetState extends State<MyWidget> {
bool _hover = false;
@override
Widget build(BuildContext context) {
return DropRegion(
renderObjectType: RenderObjectType.box,
hitTestBehavior: HitTestBehavior.translucent,
formats: Formats.standardFormats,
onDropOver: (event) {
return DropOperation.copy;
},
onDropEnter: (event) {
setState(() => _hover = true);
print('\nonDropEnter');
},
onDropLeave: (event) {
setState(() => _hover = false);
print('onDropLeave');
},
onPerformDrop: (event) async {
print('onPerformDrop');
},
onDropEnded: (event) {
print('onDropEnded');
},
child: Column(
children: [
Container(
height: 200,
width: 200,
color: _hover ? Colors.green : Colors.lightGreen,
),
Link(
uri: Uri.parse(''),
builder: (context, followLink) {
return Container(
height: 200,
width: 200,
color: _hover ? Colors.blue : Colors.lightBlue,
);
},
)
],
),
);
}
}
Hello, I used this package it works fine after adding rust and all the needed requirements on Linux.
it's works well on my PC but when I built a deb file and tried to install it on another Ubuntu system the installation was complete the icon is there but when I run it it remain loading then it does not show on the screen
this is the error that appear to me on other Linux system
error while loading shared libraries: libsuper_native_extensions.so: cannot open shared object file: No such file or directory
First of all great package and thank you for open sourcing it!
I ran into a small issue. When I drag in a simple text file it happens that the Format is not be considered format.plaintext while my assumption is that it should be.
How to reproduce (I reproduced it on macOS Ventura):
[public.file-url, com.apple.finder.node, public.plain-text]
Expected behaviour: I would suspect this file to be a plaintext format. I already saw that for iOS you added this file type the plaintextFormat
. Let me know if my assumption is correct and I can create a PR if needed.
On web I get the following error when doing :
final html = "<html><body><p>TEST</p></body></html>";
final item = DataWriterItem();
item.add(Formats.htmlText(html));
await ClipboardWriter.instance.write([item]);
Error: Expected a value of type 'Clipboard', but got one of type 'Null'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 288:49 throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 121:3 castError
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart 245:34 as
packages/super_native_extensions/src/web/clipboard_api.dart 34:61 getClipboard
packages/super_native_extensions/src/web/clipboard_writer.dart 36:23 write
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/super_native_extensions/src/web/clipboard_writer.dart 31:21 write
packages/super_clipboard/src/writer.dart 103:42 write
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50 <fn>
dart-sdk/lib/async/zone.dart 1661:54 runUnary
dart-sdk/lib/async/future_impl.dart 147:18 handleValue
dart-sdk/lib/async/future_impl.dart 784:44 handleValueCallback
dart-sdk/lib/async/future_impl.dart 813:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 584:5 [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 657:7 callback
dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 177:15 <fn>
The example project works fine though, but I cannot find the difference.
Hey Matej,
we actually don't using the plugin (super_drag_and_drop) on Android (only on macOS and Windows), but when we trying to build our Android version, there appear the following error message:
FAILURE: Build failed with an exception.
* Where:
Script '/Users/leon/.pub-cache/hosted/pub.dev/super_native_extensions-0.2.2/cargokit/gradle/plugin.gradle' line: 90
* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin class 'CargoKitPlugin'.
> No such property: childProjects for class: java.util.TreeMap$Entry
* 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 8s
Exception: Gradle task assembleDebug failed with exit code 1
Exited
child: DragItemWidget(
dragItemProvider: (request) async {
final item = DragItem();
item.add(....);
final url = "..."; // can I get the target native path?
toast("Download file into path $url")
return item;
},
allowedOperations: () => [DropOperation.copy],
child: DraggableWidget()
)
I want to show a toast as below, but it seems that I can not get the drag target native path. Are there someway to get it?
In the example provided, binary files are exposed as a stream instead of being loaded into memory:
if (reader.canProvide(Formats.pdf)) {
reader.getFile(Formats.pdf, (file) {
// Binary files may be too large to be loaded in memory and thus
// are exposed as stream.
final stream = file.getStream();
print(stream);
// Alternatively, if you know that that the value is small enough,
// you can read the entire value into memory:
// (note that readAll is mutually exclusive with getStream(), you
// can only use one of them)
// final data = file.readAll();
}, onError: (error) {
print('Error reading value $error');
});
}
How do I use the stream and save it as a pdf in local storage?
I copy code and launch the example super_clipboard successfully but when I click any button, all showed an error
E/flutter ( 6830): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Irondash init structure size differs between rust and dart.
E/flutter ( 6830): #0 NativeFunctions.get (package:irondash_message_channel/src/native_functions.dart:100:9)
E/flutter ( 6830): #1 MessageChannelContext.forInitFunction (package:irondash_message_channel/src/message_channel.dart:85:25)
E/flutter ( 6830): #2 _getNativeContext (package:super_native_extensions/src/native/context.dart:16:34)
E/flutter ( 6830): #3 _nativeContext (package:super_native_extensions/src/native/context.dart:20:24)
E/flutter ( 6830): #4 _nativeContext (package:super_native_extensions/src/native/context.dart)
E/flutter ( 6830): #5 superNativeExtensionsContext (package:super_native_extensions/src/native/context.dart:30:25)
E/flutter ( 6830): #6 new ClipboardReaderImpl (package:super_native_extensions/src/native/clipboard_reader.dart:18:16)
E/flutter ( 6830): #7 ClipboardReader.instance (package:super_native_extensions/src/clipboard_reader.dart:6:43)
E/flutter ( 6830): #8 ClipboardReader.instance (package:super_native_extensions/src/clipboard_reader.dart)
E/flutter ( 6830): #9 ClipboardReader.readClipboard (package:super_clipboard/src/reader.dart:161:46)
E/flutter ( 6830): #10 _MyHomePageState._paste (package:yedda_notifications_app_flutter/pages/test_page.dart:202:42)
E/flutter ( 6830): #11 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1096:21)
E/flutter ( 6830): #12 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)
E/flutter ( 6830): #13 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627:11)
E/flutter ( 6830): #14 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:306:5)
E/flutter ( 6830): #15 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:239:7)
E/flutter ( 6830): #16 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:615:9)
E/flutter ( 6830): #17 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
E/flutter ( 6830): #18 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
E/flutter ( 6830): #19 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
E/flutter ( 6830): #20 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
E/flutter ( 6830): #21 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
E/flutter ( 6830): #22 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:460:19)
E/flutter ( 6830): #23 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:440:22)
E/flutter ( 6830): #24 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:336:11)
E/flutter ( 6830): #25 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:395:7)
E/flutter ( 6830): #26 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:357:5)
E/flutter ( 6830): #27 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:314:7)
E/flutter ( 6830): #28 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:295:7)
E/flutter ( 6830): #29 _invoke1 (dart:ui/hooks.dart:164:13)
E/flutter ( 6830): #30 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:361:7)
E/flutter ( 6830): #31 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:31)
E/flutter ( 6830):
Version:
$ flutter --version
Flutter 3.7.12 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4d9e56e694 (6 weeks ago) • 2023-04-17 21:47:46 -0400
Engine • revision 1a65d409c7
Tools • Dart 2.19.6 • DevTools 2.20.1
$ rustc --version
rustc 1.69.0 (84c898d65 2023-04-16)
android.ndkVersion "25.2.9519653"
Hey Matej,
the super_drag_and_drop
works fine on macOS. However, it causes a few problems on Windows. When start dragging, we don't have a drag image inside the application. If we drag the across the application boundary, we see the drag image.
We have a list of files and each row has a DragItemWidget
.
As soon as we start dragging we get the following exception:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/rendering/proxy_box.dart': Failed assertion: line 3453 pos 12: '!debugNeedsPaint': is not true.
package:flutter/…/rendering/proxy_box.dart:3453
#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2 RenderRepaintBoundary.toImage
package:flutter/…/rendering/proxy_box.dart:3453
#3 DragItemWidgetState._getSnapshot
package:super_drag_and_drop/src/draggable_widget.dart:88
#4 DraggableFileState._draggableWrapper.<anonymous closure>
package:spaces_client/…/list/draggableFile.dart:151
#5 DragItemWidgetState.createItem
package:super_drag_and_drop/src/draggable_widget.dart:98
#6 DraggableWidget.dragConfigurationForItems
package:super_drag_and_drop/src/draggable_widget.dart:184
<asynchronous suspension>
#7 _DragDetector._maybeStartDragWithSession
package:super_drag_and_drop/src/drag_internal.dart:161
<asynchronous suspension
According to this issue flutter/flutter#22308, I tried a 20ms delay before i request the snapshot image. The exception is then gone, but we still don't have a drag image within the application (see video below).
Maybe it is also important to mention that we get the following error message as soon as we start the application:
ERROR [] Unexpected error The window has already been registered as a drop target. (0x80040101) at src\.\win32\drop.rs:138:43
return DragItemWidget(
key: dragItemKey,
dragItemProvider: (snapshot, session) async {
final fileName = widget.fileItem.name;
List<Map<String, dynamic>> encodedFileItems = [];
if (viewModel.isInSelectionMode) {
final selectedFileItems = viewModel.getSelectedFiles();
selectedFileItems.forEach((f) {
encodedFileItems.add(f.toJson());
});
} else {
encodedFileItems.add(widget.fileItem.toJson());
}
await Future.delayed(const Duration(milliseconds: 20));
final img = await snapshot();
final item = DragItem(
image: img,
suggestedName: fileName,
localData: encodedFileItems,
);
if (!item.virtualFileSupported) {
return item;
}
if (!widget.fileItem.isDirectory) {
item.addVirtualFile(
format: Formats.fileUri,
provider: (sinkProvider, progress) async {
final fileSize = widget.fileItem.size;
final sink = sinkProvider(fileSize: fileSize);
await viewModel.streamFile(
file: widget.fileItem,
onReceiveData: (data) {
sink.add(data);
},
onStreamDone: () {
sink.close();
},
);
},
);
}
return item;
},
allowedOperations: () => [DropOperation.copy],
child: DraggableWidget(
dragItemsProvider: (context) {
if (viewModel.isInSelectionMode) {
viewModel.dragItemKeys.removeWhere((e) => e.currentState == null);
return viewModel.dragItemKeys.map((e) => e.currentState!).toList();
} else {
return [dragItemKey.currentState!];
}
},
child: child,
),
);
}
I have a problem with super clipboard package
I copied a PNG image but after copying it was converted to JPG and the background became black.
How can i fix that?
Thanks for your answers
Hi, thanks for the great package. I want to copy an image from Finder
and paste it using super_clipboard
via CTRL + V command. But when I do that it always just returns the name of the file in text/plain
format, not the image. With the example app provided in super_clipboard also the same issue. Am I missing something?
On web when i try to get value from ClipBoard other than text like image or file i get this error
Error: DataError: No valid data on clipboard.
I am using this code :
final reader = await ClipboardReader.readClipboard()
plugin https://pub.dev/packages/super_clipboard
Please tell what to do or what i am missing to get a file or image from ClipBoard.
How to access all the items on the device clipboard
I have found that if the data copied on the Mac contains a letter with a semicolon, such as "a;", and read it as plainText, the error "Unhandled Exception: Instance of 'FormatException'" occurs.
you can copy below line:
a;
Hi. Thanks for the great package.
I am using super_drag_and_drop
and I have encountered an issue when dragging text to a flutter web application (Chrome).
It is working in the macOS version.
The assertion in super_native_extensions/lib/src/web/drop.dart
failed since the file is null.
@override
Future<VirtualFileReceiver?> createVirtualFileReceiver(
DataReaderItemHandle handle, {
required String format,
}) async {
assert(file != null,
'Should not have requested virtual file receiver without file');
return _VirtualFileReceiver(format, file!);
}
I removed the assertion and changed it to return file == null ? null : _VirtualFileReceiver(format, file!);
and it works
To reproduce:
Simply drag an drop text from chrome or excel to a flutter web app.
flutter version: 3.7.0
super_drag_and_drop: 0.2.0
chrome: 110.0.5481.77
hi
This package gives the following error in the release mode when copying.
Native MessageChannel "DataProviderManager" not found
I even used the sample project, but I get this error in the release mode.
How to fix it?
Hey I tried to use the drag and drop extension in may desktop app but with no luck. Trying to get the example working I get stopped by the Formats
class which does not exists and die dart analyzer does not find. What Im doing wrong here? Is there some step missing?
I copy the product link from the application named n11 and try to paste it in the textfield, but it gives an error. When I try to get the same link from the clipboard, it prints as blank, but if I go to whatsapp and paste it, I can paste it.
n11 app link:https://www.n11.com
you can see in the video
https://user-images.githubusercontent.com/65075121/230012390-77c20cde-c309-4719-843d-abb2cf344696.mp4
"Windows Error: CoInitialize has not been called. (0x800401F0)"
I have installed rust using brew install rust. I have the rustc in my path along with cargo. However, when I try and build my flutter app I get...
2023-05-09 17:19:19.007 xcodebuild[4964:33534] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00008112-0001709C21F9401E }
{ platform:macOS, arch:x86_64, id:00008112-0001709C21F9401E }
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `build/macos/Build/Intermediates.noindex/Pods.build/Debug/super_native_extensions.build/rust_tool/debug/build_tool build_pod ../rust super_native_extensions`
Build tool failed:
Failed to run command: "rustup"
Caused by:
No such file or directory (os error 2)
Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **
% which rustc
/opt/homebrew/bin/rustc
% which cargo
/opt/homebrew/bin/cargo
Any thoughts please?
Hey folks! I hope you're having a lovely day.
I had to modify my Podfile to link frameworks statically via use_frameworks! :linkage => :static
to integrate the iron source SDK (see https://github.com/ironsource-mobile/Flutter-SDK#ios). However, when trying to build after the change, I get an Error (Xcode): Undefined symbol: _super_native_extensions_init
error. The app uses Isar, which also utilizes Rust but builds fine with static linkage.
Here's some more error output when trying to build directly in Xcode:
Undefined symbols for architecture arm64:
"_super_native_extensions_init", referenced from:
+[SuperNativeExtensionsPlugin initialize] in super_native_extensions(SuperNativeExtensionsPlugin.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any workarounds/fix hints would be very much appreciated!
FYI, I don't use super_native_extensions
itself but rather as a dependency of super_context_menu
.
trying to run the project throws note: ld: error: unable to find library -lgcc
the current workaround would be changing the target ndk to v22
When trying to use the super_clipboard
package with Flutter 3.7.3 (which requires ndk version 23.1.7779620
), I got an error indicating that a binary had not been found:
Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi20-clang
I figured I had to update the minSdkVersion
in my android/app/build.gradle
file to match one of the available binaries in the ndk directory. So I updated it to version 21
.
After that I got another error indicating that the super_native_extensions
package required at least version 23 of the sdk.
So I think it would be great if we could indicate in the README the minSdkVersion.
I haven't found a way to drag multiple drag items (especially virtual files) on desktop. Is this possible?
Hey 👋,
I can't run the app when I add super_context_menu 0.1.0 to my pubspec.yaml
Compiler says:
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\emrec\AppData\Local\Pub\Cache\hosted\pub.dev\super_native_extensions-0.4.0\cargokit\gradle\plugin.gradle' line: 145
* What went wrong:
A problem occurred configuring project ':super_native_extensions'.
> Failed to notify project evaluation listener.
3
> NDK is not installed
* 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 3s
Exception: Gradle task assembleDebug failed with exit code 1
Any ideas?
Stacktrace
2023-01-10 19:24:05.755281+0100 Superlist[64007:57501030] *** Assertion failure in void _UIDragInteractionDriverStateMachineHandleEvent(_UIDragInteractionDriverStateMachine *const _Nonnull, _UIDragInteractionDriver *const __strong _Nonnull, _UIDragLiftEvent)(), _UIDragInteractionDriverStateMachine.m:128
2023-01-10 19:24:05.759630+0100 Superlist[64007:57501030] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Events queue shouldn't overflow'
*** First throw call stack:
(
0 CoreFoundation 0x000000018040e7c8 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x0000000180051144 objc_exception_throw + 56
2 Foundation 0x0000000180b13ccc -[NSMutableDictionary(NSMutableDictionary) classForCoder] + 0
3 UIKitCore 0x000000010cc0d280 _UIDragInteractionDriverStateMachineHandleEvent + 332
4 UIKitCore 0x000000010d00fc60 -[_UIDragInteractionLongPressDriver _dragInitiationGestureStateChanged:] + 384
5 UIKitCore 0x000000010c6bf254 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 76
6 UIKitCore 0x000000010c6c6b44 _UIGestureRecognizerSendTargetActions + 88
7 UIKitCore 0x000000010c6c4410 _UIGestureRecognizerSendActions + 300
8 UIKitCore 0x000000010c6c3b40 -[UIGestureRecognizer _updateGestureForActiveEvents] + 496
9 UIKitCore 0x000000010c6b7b08 _UIGestureEnvironmentUpdate + 2544
10 CoreFoundation 0x000000018037212c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
11 CoreFoundation 0x000000018036cacc __CFRunLoopDoObservers + 512
12 CoreFoundation 0x000000018036cf84 __CFRunLoopRun + 968
Following on from #86, I'm encountering another bug on Windows where if you paste an image taken with the snipping tool, the result is just an empty array.
(I can confirm that #86 is fixed and actual files can be pasted as expected.)
Shift + Windows + S
)flutter: pasted []
is printed/// Maps image formats to their file extension.
const Map<SimpleFileFormat, String> formats = {
Formats.png: '.png',
// ...
};
for (SimpleFileFormat format in formats.keys) {
if (!reader.canProvide(format)) continue;
final progress = reader.getFile(
format,
(file) async {
final stream = file.getStream();
final List<int> bytes = [];
await Future.delayed(const Duration(milliseconds: 100));
await for (final chunk in stream) {
bytes.addAll(chunk);
await Future.delayed(const Duration(milliseconds: 100));
}
print('pasted $bytes'); // flutter: pasted []
String extension;
if (file.fileName != null) {
extension = file.fileName!.substring(file.fileName!.lastIndexOf('.'));
} else {
extension = formats[format]!;
}
photoInfos.add(PhotoInfo(
bytes: Uint8List.fromList(bytes),
extension: extension,
));
},
);
if (progress != null) progresses.add(progress);
}
Future.delayed
s to make sure that it wasn't a problem of not waiting long enough. I also increased them to 3000ms but that didn't change anything.Flutter 3.7.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 62bd79521d (3 days ago) • 2023-03-30 10:59:36 -0700
Engine • revision ec975089ac
Tools • Dart 2.19.6 • DevTools 2.20.1
Hello and first of all, thanks for the great package! It's been working really well and was very easy to integrate.
In our project, we target iOS, Android and Web. We wanted to implement a Copy & Paste feature mainly on Web. Due to NDK being needed for Android, we wanted to disable the feature on Android so that we don't need to rely on the NDK. However, as soon as we have super_clipboard in pubspec, Android will not build due to NDK issues.
Therefore I wanted to ask: Is it somehow possible to disable super_clipboard on a platform? (I would like to avoid flavors to reduce complexity).
Thank you!
because depends on both win32 ^5.0.3 and super_clipboard ^0.4.0, version solving failed.
Thank you very much for the plugin you developed, I don't know if you can support win32^5.0.3
Hey Matej,
we want to use the HitTestBehavior.translucent
value to delegate the events to the visually behind target but it doesn't seem to work.
In the example code we want that once you hovered over a nested DropRegion
(the red container which has HitTestBehavior.translucent, hovering with an external file) then the drag event should be also consumed by the outer DropRegion
(visually behind). But the print messages in the outer one are never called.
Or are we misunderstanding the HitTestBehavior.translucent
?
import 'package:flutter/material.dart';
import 'package:super_drag_and_drop/super_drag_and_drop.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return DropRegion(
formats: Formats.standardFormats,
onDropOver: (event) {
print("# onDropOver intercepted by scaffold");
return DropOperation.copy;
},
onPerformDrop: (event) async {
print("# onPerformDrop intercepted by scaffold");
},
child: Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
DropRegion(
formats: Formats.standardFormats,
onDropOver: (event) {
print("# onDropOver intercepted by amber container");
return DropOperation.copy;
},
onPerformDrop: (event) async {
print("# onPerformDrop intercepted by amber container");
},
child: Container(
width: 200,
height: 200,
color: Colors.amber,
),
),
DropRegion(
formats: Formats.standardFormats,
hitTestBehavior: HitTestBehavior.translucent,
onDropOver: (event) {
print("# onDropOver intercepted by red container");
return DropOperation.copy;
},
onPerformDrop: (event) async {
print("# onPerformDrop intercepted by red container");
},
child: Container(
width: 200,
height: 200,
color: Colors.redAccent,
),
),
DropRegion(
formats: Formats.standardFormats,
onDropOver: (event) {
print("# onDropOver intercepted by yellow container");
return DropOperation.copy;
},
onPerformDrop: (event) async {
print("# onPerformDrop intercepted by yellow container");
},
child: Container(
width: 200,
height: 200,
color: Colors.yellowAccent,
),
),
],
),
),
),
);
}
}
[✓] Flutter (Channel stable,
3.7.7, on macOS 13.2.1 22D68
darwin-arm64 (Rosetta),
locale en-DE)
• Flutter version 3.7.7 on
channel stable at
/Users/apoorv/Development/T
ools/flutter
• Upstream repository
https://github.com/flutter/
flutter.git
• Framework revision
2ad6cd72c0 (2 weeks ago),
2023-03-08 09:41:59 -0800
• Engine revision 1837b5be5f
• Dart version 2.19.4
• DevTools version 2.20.1
[✓] Android toolchain - develop
for Android devices (Android
SDK version 30.0.3)
• Android SDK at
/Users/apoorv/Library/Andro
id/sdk
• Platform android-33,
build-tools 30.0.3
• Java binary at:
/Applications/Android
Studio.app/Contents/jre/Con
tents/Home/bin/java
• Java version OpenJDK
Runtime Environment (build
11.0.13+0-b1751.21-8125866)
• All Android licenses
accepted.
[✓] Xcode - develop for iOS and
macOS (Xcode 14.2)
• Xcode at
/Applications/Xcode.app/Con
tents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at
/Applications/Google
Chrome.app/Contents/MacOS/G
oogle Chrome
[✓] Android Studio (version
2021.3)
• Android Studio at
/Applications/Android
Studio.app/Contents
• Flutter plugin can be
installed from:
🔨
https://plugins.jetbrains.c
om/plugin/9212-flutter
• Dart plugin can be
installed from:
🔨
https://plugins.jetbrains.c
om/plugin/6351-dart
• Java version OpenJDK
Runtime Environment (build
11.0.13+0-b1751.21-8125866)
[✓] VS Code (version 1.76.2)
• VS Code at
/Applications/Visual Studio
Code.app/Contents
• Flutter extension version
3.60.0
[✓] Connected device (2
available)
• macOS (desktop) • macos •
darwin-arm64 • macOS
13.2.1 22D68 darwin-arm64
(Rosetta)
• Chrome (web) • chrome •
web-javascript • Google
Chrome 111.0.5563.64
[✓] HTTP Host Availability
• All required HTTP hosts are
available
I get several rust errors when trying run flutter build apk
💪 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<T>(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<Option<T>>,
| ^^^^^^ 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<T> Default for OnceCell<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: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<T: Clone> Clone for OnceCell<T> {
| ^^^^^ 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<T: Clone> Clone for OnceCell<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: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<T: PartialEq> PartialEq for OnceCell<T> {
| ^^^^^^^^^ 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<T: PartialEq> PartialEq for OnceCell<T> {
| ^^^^^^^^^ 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<T: Eq> Eq for OnceCell<T> {}
| ^^ 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<T: Eq> Eq for OnceCell<T> {}
| ^^ 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<T> From<T> for OnceCell<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: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<T, 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/lib.rs:588:28
|
588 | F: FnOnce() -> Result<T, 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/lib.rs:586:54
|
586 | pub fn get_or_try_init<F, E>(&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<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:651:36
|
651 | pub fn into_inner(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:680:20
|
680 | init: Cell<Option<F>>,
| ^^^^^^ 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<T, F>) -> Result<T, F> {
| ^^^^^^ 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, F: FnOnce() -> T> Lazy<T, F> {
| ^^^^^^ 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<T, F>) -> 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<T, F>) -> 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, F: FnOnce() -> T> Deref for Lazy<T, F> {
| ^^^^^^ 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, F: FnOnce() -> T> DerefMut for Lazy<T, F> {
| ^^^^^^ 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<T: Default> Default for Lazy<T> {
| ^^^^^^^ 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<T: Default> Default for Lazy<T> {
| ^^^^^^^ 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<T> Default for OnceCell<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: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<T: Clone> Clone for OnceCell<T> {
| ^^^^^ 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<T: Clone> Clone for OnceCell<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: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<T> From<T> for OnceCell<T> {
| ^^^^ 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<T: PartialEq> PartialEq for OnceCell<T> {
| ^^^^^^^^^ 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<T: PartialEq> PartialEq for OnceCell<T> {
| ^^^^^^^^^ 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<T: Eq> Eq for OnceCell<T> {}
| ^^ 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<T: Eq> Eq for OnceCell<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: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<T, 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/lib.rs:1113:28
|
1113 | F: FnOnce() -> Result<T, 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/lib.rs:1111:54
|
1111 | pub fn get_or_try_init<F, E>(&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<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:1176:36
|
1176 | pub fn into_inner(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:1216:20
|
1216 | init: Cell<Option<F>>,
| ^^^^^^ 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<T, F: Send> Sync for Lazy<T, F> where OnceCell<T>: 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<T, F: Send> Sync for Lazy<T, F> where OnceCell<T>: 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<T, F: Send> Sync for Lazy<T, F> where OnceCell<T>: 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<T, F>) -> Result<T, F> {
| ^^^^^^ 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, F: FnOnce() -> T> Lazy<T, F> {
| ^^^^^^ 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<T, F>) -> 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<T, F>) -> 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, F: FnOnce() -> T> Deref for Lazy<T, F> {
| ^^^^^^ 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, F: FnOnce() -> T> DerefMut for Lazy<T, F> {
| ^^^^^^ 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<T: Default> Default for Lazy<T> {
| ^^^^^^^ 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<T: Default> Default for Lazy<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/race.rs:45:26
|
45 | pub fn get(&self) -> Option<NonZeroUsize> {
| ^^^^^^ 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<NonZeroUsize, 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:90:24
|
90 | F: FnOnce() -> Result<NonZeroUsize, 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:88:50
|
88 | pub fn get_or_try_init<F, E>(&self, f: F) -> Result<NonZeroUsize, 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/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<bool> {
| ^^^^^^ 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<bool, 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:159:24
|
159 | F: FnOnce() -> Result<bool, 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:157:50
|
157 | pub fn get_or_try_init<F, E>(&self, f: F) -> Result<bool, E>
| ^^^^^^ 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<Option<Box<T>>>,
| ^^^^^^ 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<T> Default for OnceBox<T> {
| ^^^^^^^ 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<T> Drop for OnceBox<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/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<T>) -> Result<(), Box<T>> {
| ^^^^^^ 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<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/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<Box<T>, 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<Box<T>, 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<F, E>(&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<T: Sync + Send> Sync for OnceBox<T> {}
| ^^^^ 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<T: Sync + Send> Sync for OnceBox<T> {}
| ^^^^ 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<T: Sync + Send> Sync for OnceBox<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:1370:36
|
1370 | unsafe fn unwrap_unchecked<T>(val: Option<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: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::<T, Void>(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::<T, Void>(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::<NonZeroUsize, Void>(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::<Box<T>, 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````
</details>
final item = DataWriterItem(); item.add(Formats.png(result)); await ClipboardWriter.instance.write([item]);
get error:
PlatformException(super_native_extensions_error, "Windows Error: 尚未调用 CoInitialize。", otherError, null)
The instructions say:
NDK version your project expects is specified in build.gradle.
android {
// by default the project uses NDK version from flutter plugin.
ndkVersion flutter.ndkVersion
but my freshly created Android project has no android entry in build.gradle. Do I add this section? Something else?
When running reader.getFile(Formats.png, ...)
on Windows 11, I get this exception:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(super_native_extensions_error, virtual file receive error: item not found, virtualFileReceiveError, null)
This doesn't occur if I set allowVirtualFiles
to false in the reader.getFile
call.
final reader = await ClipboardReader.readClipboard();
final futures = <Future>[];
for (SimpleFileFormat format in formats) {
if (!reader.canProvide(format)) continue;
reader.getFile(format, (file) {
futures.add(processFile(file, format));
});
}
await Future.wait(futures);
processFile
function never gets run since reader.getFile
throws without running the onFile
callback.formats
is a list of image formats (Formats.jpeg
, Formats.png
, etc) but when I tested with just Formats.png
the error still occured.Currently there are three separate ways to consume dropped content
Which of these (or a combination) need to be handled depends on platform and source application.
This needs to be streamlined. There should be unified API to consume dropped content that would provide the highest possible fidelity by default.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.