iabudiab / HTMLKit

An Objective-C framework for your everyday HTML needs.
MIT License
239 stars 27 forks source link

Fix compilation for Swift 3.1 #6

Closed tali closed 7 years ago

tali commented 7 years ago

Move the module.modulemap into Sources/include and add an exclude for Tests/Fixtures.

iabudiab commented 7 years ago

Thanks for the fix!

tali commented 7 years ago

Hi, While this commit actually fixes swift build, it does not fix swift test. When testing or when importing HTMLKit into my own Swift project, I get lots of errors ala:

HTMLKit/Sources/include/HTMLTokenizerCharacters.h:42:1: error: redefinition of 'APOSTROPHE' with a
 different type: 'const UTF32Char' (aka 'const unsigned int') vs 'const UniChar' (aka 'const unsigned short')
CHARACTERS
^
HTMLKit/Sources/include/HTMLTokenizerCharacters.h:20:8: note: expanded from macro 'CHARACTERS'
    CHAR( APOSTROPHE, 0x0027 ) \
          ^
HTMLKit/Sources/include/CSSCodePoints.h:50:1: note: previous definition is here
CODEPOINTS
^
HTMLKit/Sources/include/CSSCodePoints.h:21:13: note: expanded from macro 'CODEPOINTS'
        CODEPOINT( APOSTROPHE, 0x0027 ) \
                   ^
While building module 'HTMLKit' imported from HTMLKit/Tests/HTMLKitTests/HTMLCharacterDataTests.m:10:

What's the best way to fix that?

tali commented 7 years ago

I created #7 as a followup.