microsoft / microsoft/edit

Hardcoded .so suffix breaks dynamic ICU loading on macOS

Open
#443 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-task E-help-wanted
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.