Hardcoded .so suffix breaks dynamic ICU loading on macOS
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 14.6k
- Forks
- 734
- Avg merge
- 8h 40m
- Merged PRs (30d)
- 4
Description
Hi,
The current implementation of dynamic ICU library loading is incompatible with macOS due to hardcoded `.so` suffixes. On macOS, ICU libraries are distributed as `.dylib` files (e.g., libicuuc.72.dylib) rather than `.so`, and `dlopen("libicuuc.so")` fails.
https://github.com/microsoft/edit/blob/5c5471e9443353b0f60c5380e515c4559e0316b1/src/sys/unix.rs#L462-L468
Additionally, the `icu_proc_suffix()` logic assumes `.so.`-based versioning for extracting ICU suffixes, which also does not hold for `.dylib` naming conventions (e.g., `libicuuc.72.dylib` instead of `libicuuc.so.72.1`).
https://github.com/microsoft/edit/blob/5c5471e9443353b0f60c5380e515c4559e0316b1/src/sys/unix.rs#L514-L520
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the dynamic ICU loading code in src/sys/unix.rs around lines 462-468 and the icu_proc_suffix() logic around lines 514-520. Verify the expected macOS library naming against the existing Unix loading behavior. Done means macOS can load .dylib ICU libraries and extract their version suffixes without breaking the existing .so handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100