treasure-data / serverengine

A framework to implement robust multiprocess servers like Unicorn
Apache License 2.0
759 stars 86 forks source link

build gems for windows platform #67

Closed frsyuki closed 8 years ago

frsyuki commented 8 years ago

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 fakes gem.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.

tagomoris commented 8 years ago

Did you see this hack in any existing famous gems? Or did you invent this?

frsyuki commented 8 years ago

I did. Do you concern future API compatibility of Gem::Specification#platform?

tagomoris commented 8 years ago

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.

frsyuki commented 8 years ago

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.

tagomoris commented 8 years ago

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.

frsyuki commented 8 years ago

Now I came up with an idea that we put a dummy ext library and use rake-compiler-dock...it's still hacky