Add loadDynamicLibraryRaw for non-standard library filenames#7
Merged
brian-at-pieces merged 4 commits intomainfrom Feb 26, 2026
Merged
Add loadDynamicLibraryRaw for non-standard library filenames#7brian-at-pieces merged 4 commits intomainfrom
brian-at-pieces merged 4 commits intomainfrom
Conversation
Adds a new function that accepts a raw filename (with prefix and extension already included), bypassing fullLibraryName() platform conventions. Needed for versioned Linux shared objects like 'libonnxruntime.so.1.23.2'. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new loader entry point to support dynamic libraries with non-standard filenames (e.g., version-suffixed .so files) by bypassing the platform naming convention logic used by the existing loader.
Changes:
- Introduces
loadDynamicLibraryRaw({ fileName, searchPath })to open a dynamic library by explicit filename. - Mirrors existing diagnostics/error reporting (missing directory, missing file, dependency check output) for improved troubleshooting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Changed analysis_options.yaml include from package:runtime_lints (no longer a dependency) to package:flutter_lints/flutter.yaml - Added CHANGELOG.md entry for version 1.0.1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tests Extract _resolveLibraryPath and _openWithDiagnostics to deduplicate logic between loadDynamicLibrary and loadDynamicLibraryRaw. Add exception tests mirroring existing coverage for the raw variant. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
loadDynamicLibraryRawfunction that loads a dynamic library using an explicit filename, bypassing platform naming conventionslibonnxruntime.so.1.23.2)Test plan
loadDynamicLibraryRawloads a library with a non-standard filenameloadDynamicLibrarybehavior is unchanged🤖 Generated with Claude Code