-
Notifications
You must be signed in to change notification settings - Fork 23
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
Multiple re2 installations, should be a peer dependency #2
Comments
Hey there, thanks for the report! |
Ok so I understand the setting
This is quite an issue as I don't want to force host projects using this library to set Furthermore, I see that the |
Indeed, you are right, our case was fixed but having two or more dependencies using node-re2 could be likely at some point, and it would hinder the usage of either library. Probably then node-re2 has to fix this, i saw in that issue that the author was removing global state, which is highly probable the cause of this. |
Agreed, but yes in any case it's the responsibility of |
Hello
We found an error because we are using this library, and url-regex-safe at the same time, and both link to node-re2 library.
So when we run
jest
, we find a malloc issue. See this repo we created https://github.com/blastradius-ai/re2-malloc-error.The solution would be to put re2 as a peer-dependency, like url-regex-safe has done it in its latest version (https://github.com/spamscanner/url-regex-safe/releases/tag/v3.0.0).
So that way we would have to install re2 ourselves, and only a single instance is created.
Hope this can be done, or if you want we can create a PR for that.
Thanks
The text was updated successfully, but these errors were encountered: