Closed frsyuki closed 8 years ago
Did you see this hack in any existing famous gems? Or did you invent this?
I did. Do you concern future API compatibility of Gem::Specification#platform?
No. I prefer to use non-hacky standard way (like rake-compiler-dock) for build steps rather than such hacky way, even if this library doesn't include native extensions.
I agree that less hacky way is better but rake-compiler-dock + rake-compiler didn't work (as far as I tried) because rake-compiler tries to compile ext and fails.
I spent few hours to try rake-compiler-dock for it, and confirmed that it doesn't work well too... Okay, we should merge this change.
Now I came up with an idea that we put a dummy ext library and use rake-compiler-dock...it's still hacky
gemspec contains a runtime dependency for Windows platform. However, because gemspec is evaluated on a local machine, built gems will contain pre-evaluated yaml file. Therefore, either of following happens:
build:all
task fakesgem.platform
only so that it builds 3 versions of gems (universal, 32bit-windows, 64-bit windows).This is doable without cross compiler because serverengine itself doesn't have native extensions.