Skip to content
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

[native_assets] dart test not adding asset mapping to kernel file #55712

Closed
dcharkes opened this issue May 14, 2024 · 1 comment
Closed

[native_assets] dart test not adding asset mapping to kernel file #55712

dcharkes opened this issue May 14, 2024 · 1 comment
Assignees
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-test Issues related to the 'dart test' tool P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@dcharkes
Copy link
Contributor

ec4e420 caused:

On a42c38b:

$ ~/dart-sdk/sdk/xcodebuild/ReleaseARM64/dart-sdk/bin/dart --enable-experiment=native-assets test
Resolving dependencies in `/Users/dacoharkes/src/google/flutter-mediapipe/packages/mediapipe-task-text`... 
Downloading packages... 
Got dependencies in `/Users/dacoharkes/src/google/flutter-mediapipe/packages/mediapipe-task-text`.
Building package executable... (2.1s)
Built test:test.
00:00 +2 -2: test/language_detector_executor_test.dart: LanguageDetectorExecutor should run a task [E]                                                                            
  Invalid argument(s): Couldn't resolve native function 'language_detector_create' in 'package:mediapipe_text/src/io/third_party/mediapipe/generated/mediapipe_text_bindings.dart' : No asset with id 'package:mediapipe_text/src/io/third_party/mediapipe/generated/mediapipe_text_bindings.dart' found. Available native assets: . Attempted to fallback to process lookup. dlsym(RTLD_DEFAULT, language_detector_create): symbol not found.
  
  dart:ffi                                                                                      Native._ffi_resolver_function
  package:mediapipe_text/src/io/third_party/mediapipe/generated/mediapipe_text_bindings.dart    language_detector_create
  package:mediapipe_text/src/io/tasks/language_detection/language_detector_executor.dart 35:29  LanguageDetectorExecutor.createWorker
  package:mediapipe_core/src/io/task_executor.dart 56:17                                        TaskExecutor.worker
  package:mediapipe_text/src/io/tasks/language_detection/language_detector_executor.dart 66:7   LanguageDetectorExecutor.detect
  test/language_detector_executor_test.dart 27:54                                               main.<fn>.<fn>

After reverting ec4e420:

$ ~/dart-sdk/sdk/xcodebuild/ReleaseARM64/dart-sdk/bin/dart --enable-experiment=native-assets test
Building package executable... 
Built test:test.
00:00 +4: test/language_detector_executor_test.dart: LanguageDetectorExecutor should run a task                                                                                   INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
WARNING: Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors (tensor#15 is a dynamic-sized tensor).
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1715668092.905634 1825992 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors.
[...]
00:00 +22: All tests passed!                                                                                                                                                      

I can see that the build.dart hook is run, but the mapping is somehow not embedded in the kernel file.

@dcharkes dcharkes added area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-test Issues related to the 'dart test' tool labels May 14, 2024
@dcharkes dcharkes added the P1 A high priority bug; for example, a single project is unusable or has many test failures label May 14, 2024
@dcharkes
Copy link
Contributor Author

Adding P1 for either fix forward or a revert.

craiglabenz added a commit to google/flutter-mediapipe that referenced this issue May 14, 2024
craiglabenz added a commit to google/flutter-mediapipe that referenced this issue May 14, 2024
* getting ready to publish

* removed Flutter as dependency from task packages

MediaPipe packages are all now pure-Dart

* more readme updates

* makes good on private field promotion

* debugging integration test failures

* readme image path fixes

* remove early exit

* debugging

* returning to flutter_test

* removes flutter sdk dependency again

test failures in CI are from dart-lang/sdk#55712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-test Issues related to the 'dart test' tool P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

2 participants