MSVC should be able to compile nokogiri C extension #2016
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem is this PR intended to solve?
Aims to partially fix the issue #2015 to allow compilation on MSVC.
This fixes the redefinition issues, but ideally the packaged dependencies (zlib, libxml, lixslt) would work out of the box (I am using
conan
to get the dependencies and passing some arguments such aswith-xxx-dir
to make it work right now), and the .cross-rubies and task/cross-ruby.rb would be modified to allow MSVC gems to be packaged.Have you included adequate test coverage?
We have a thorough test suite that allows us to create releases confidently and prevent accidental regressions. Any proposed change in behavior must be accompanied by tests.
If possible, please try to write the tests so that they communicate intent.
Does this change affect the C or the Java implementations?
I'm adding a macro to the C nokogiri.h header which shouldn't have much effect since it's wrapped in a
#if _MSC_VER
block.I currently added jaro_winkler to a patched version of mine (tonytonyjan/jaro_winkler#43)