-
-
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
Question: dependency on unf_ext needed? #3
Comments
First of all, thanks for using http-cookie, and I regret any inconvenience it caused you and your users. Ruby started to offer Unicode Nomalization starting from 2.2, so there would be a chance of getting the dependency on the native extension optional for Ruby >=2.2. All you have to do is define a version-specific dependency in a gemspec, and the easiest way would be to make unf_ext stop compiling itself and instead providing just a wrapper for the built-in Unicode Normalization API of Ruby. However, that's not ideal because it just takes away the alternative implementation of UN from the newer versions of Ruby. I'll have to find out a better way. |
I've just rolled out unf-0.2.0.beta1, which only builds and uses unf_ext on Ruby <2.2. If the trick used is proven to work, there's going to be an official release. |
Not sure where I should post this but this discussion it's close enough so I'm commenting here. I have a Rails app that has a dependency to rest_client 1.8.0. It has a dependency to domain_name 0.5.24, which depends on unf_ext 0.0.7. Problem is unf_ext 0.0.7 has been yanked from rubygems a few days ago, so my deployment fails when trying to get this gem. I had to go back to an earlier version of rest-client (1.6.7) to fix it. |
What gem has the fixed dependency on unf_ext 0.0.7? domain_name 0.5.24 has |
...And unf does not name any specific version of unf_ext. |
Yeah that surprised me as well but 0.0.7 is the version set after running bundle install. |
@bricedurand Ah, I didn't read your comment carefully. I feel really sorry for that, as unf_ext 0.0.7 had been there only for a couple of hours until I uploaded 0.0.7.1. Please try |
I haven't answered the original question. The answer is yes; DomainName is a library to deal with domain names including IDN/IDNA, so it must perform Unicode Normalization in NFC and NFKC as required by the related RFCs and Unicode Specification. |
Got it, that makes sense. ( I'll give it a try on ruby 2.2. |
@knu any plans on bumping unf 0.2.0 from beta to stable? its been almost a year now. |
👍 |
Actually in 2.2 Ruby introduced a built-in library called |
I recently added a dependency on http-cookie to rest-client in order to better implement RFC compliant handling of cookies.
One issue that a large number of users seem to be running into is the dependency on
unf_ext
, which requires installing C compilers and libraries that otherwise would be unnecessary. Would there be any way to get a pure ruby solution here?See rest-client/rest-client#371, for some example discussion.
The text was updated successfully, but these errors were encountered: