-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit test failed on Mac M1 #10
Comments
BTW, I found that PointyCastleArgon2 is already used in kdbx.dart: KdbxFormat([Argon2? argon2])
: assert(kdbxKeyCommonAssertConsistency()),
argon2 = argon2 == null || !argon2.isImplemented
? const PointyCastleArgon2()
: argon2; I think we can use it in unit test, which runs on dart vm and does not require any native library. Also, have your benchmarked the performance between PointyCastleArgon2 and dragon2_ffi? |
I'm happy with the performance of argon2_ffi, and I don't think dragon2_ffi existed when I implemented it.. never tried it.. I guess we could use an environment variable or something to enforce pointy castle during unit tests 🤷🏽 I would still allow both though, so the ci uses the ffi implementation |
Got it, thanks! I'll try to use pointy castle in my fork of kdbx.dart to reduce complexity. |
fwiw, if you are developing a flutter app the native libraries should be loaded automatically.. just like with authpass.. for dart itself has no way to ship assets with packages yet, but that should change soon dart-lang/sdk#50565 |
When run
flutter test
on a Mac M1 device the unit test will fail:It seems that libargon2_ffi.dylib is compiled on Mac X86_64, and I re-compiled on M1 it works. It could be solved as following(generated by GPT):
Since it requires to modify both
kdbx.dart
andargon2_ffi_base
, I'm not able to file a PR directly.The text was updated successfully, but these errors were encountered: