Skip to content

Add loadDynamicLibraryRaw for non-standard library filenames#7

Merged
brian-at-pieces merged 4 commits intomainfrom
add-load-dynamic-library-raw
Feb 26, 2026
Merged

Add loadDynamicLibraryRaw for non-standard library filenames#7
brian-at-pieces merged 4 commits intomainfrom
add-load-dynamic-library-raw

Conversation

@brian-at-pieces
Copy link
Contributor

Summary

  • Adds loadDynamicLibraryRaw function that loads a dynamic library using an explicit filename, bypassing platform naming conventions
  • Useful for libraries with non-standard naming (e.g., versioned Linux shared objects like libonnxruntime.so.1.23.2)

Test plan

  • Verify loadDynamicLibraryRaw loads a library with a non-standard filename
  • Verify error handling for missing search path directory
  • Verify error handling for missing library file
  • Verify existing loadDynamicLibrary behavior is unchanged

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings February 26, 2026 18:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

brian-at-pieces and others added 3 commits February 26, 2026 13:06
- 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>
@brian-at-pieces brian-at-pieces merged commit 91ad56c into main Feb 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants