Fix: defaultLibraryDirectory for MacOS should now point to the correct location#12
Conversation
…t location. Note: localDebug parameter is now unused -- scheduled for removal. Kept for backwards compatibility.
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, push a new commit or reopen this pull request to trigger a review.
There was a problem hiding this comment.
Pull request overview
Adjusts macOS path resolution for Flutter Rust Bridge initialization helpers so the default dynamic-library search directory points to the correct location on macOS, while keeping the localDebugMode parameter for backward compatibility.
Changes:
- Make macOS path resolution unconditional (no longer dependent on
localDebugMode) forflutterAssetsDirectoryanddefaultLibraryDirectory. - Remove the alternate macOS branch that derived the Frameworks directory from an
App.framework/Versions/Aexecutable layout.
Comments suppressed due to low confidence (1)
lib/src/frb_init.dart:56
- Formatting:
else ifshould be on the same line as the closing brace (} else if (...)). As written, it will be rewritten bydart format(the repo runs an auto-format workflow), which can create unnecessary diff churn.
} else if (Platform.isLinux) {
final String libDir = path.join(resolvedExeDir, 'lib');
return libDir;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if (Platform.isMacOS && localDebugMode) { | ||
| if (Platform.isMacOS) { | ||
| // Location of resolved exe relative dir when run locally unpackaged: |
There was a problem hiding this comment.
This comment still describes the macOS branch as "when run locally unpackaged", but the branch now applies to all macOS runs. Please adjust the wording so it reflects the unconditional macOS logic (or clarify the expected Platform.resolvedExecutable layout being assumed).
| // Location of resolved exe relative dir when run locally unpackaged: | |
| // Assumes Platform.resolvedExecutable is inside the app bundle's MacOS directory: |
Note: localDebug parameter is now unused -- scheduled for removal. Kept for backwards compatibility.