Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Test) Fix install name _and_ encoding name conversion issue #12

Conversation

savetheclocktower
Copy link

The Pulsar editor tests are failing in a way that confuses me. Most tests that modify the buffer seem to fail with

Error: Invalid encoding name: utf8

and, as luck would have it, I've got an open PR (#9) that fixes at least once cause of this.

This PR has all the changes from both #9 and #11; I'm opening it so that I can see if the changes from #9 fix the failing editor tests.

…to match the version that `superstring` expects.

This is copied directly from what Homebrew installs into `$(brew --prefix)/opt/libiconv`, except that the install name has been changed on `libiconv.2.dylib` to `libiconv.2.dylib`. (When it's installed from Homebrew, its macOS library “install name” matches its original path, so that's where macOS looks for it.

As part of the build, we rename the library with `install_name_tool` so that it can be resolved relative to the location of `superstring.node`.

This can probably be simplified, but first let's see if it'll work.
…because we need a version built for the current machine's architecture.

(If our current approach doesn't work, we could vendorize two different copies — one for each architecture.)
…by grabbing it from Homebrew or from a path specified by the user in an environment variable.
…by adding an alternate strategy that we can adopt if we ever need to.

Also copy over `libiconv`’s README and license file.
…saving the C++ code from receiving a Node-style encoding name that it doesn’t recognize.
…just to see if they're the cause of the editor test regressions in Pulsar.
@savetheclocktower
Copy link
Author

Nah, this ain't it.

@savetheclocktower savetheclocktower deleted the install-name-fix-2 branch July 3, 2024 18:20
@savetheclocktower savetheclocktower restored the install-name-fix-2 branch July 3, 2024 18:21
@savetheclocktower
Copy link
Author

Actually, I'll keep this around for a few more minutes.

@savetheclocktower
Copy link
Author

Closing in favor of #15.

@savetheclocktower savetheclocktower deleted the install-name-fix-2 branch July 6, 2024 01:30
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.

1 participant