OpenAPI Generator doesn't support Windows
Hey, I posted this in #151 but it probably makes sense as its own issue since it's tied to a specific dependency and is currently blocking me from trying to dig into getting Windows support. Just looking for some guidance to get started on this, thanks!
Hey, I'd be interested in trying to help with this effort when I have free cycles. Currently I am getting:
C:\Users\patri\Source\repos\swiftly\.build\checkouts\swift-openapi-generator\Sources\_OpenAPIGeneratorCore\PlatformChecks.swift:21:5: error: _OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly. 19 | #if !(os(macOS) || os(Linux) || (os(iOS) && targetEnvironment(macCatalyst))) 20 | #error( 21 | "_OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly." | `- error: _OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly. 22 | ) 23 | #endifcoming from here, which implies that you might need to cross-compile for Windows or do some other workaround, and that it's not possible to develop on the platform natively.
Thanks!
Originally posted by @patricktcoakley in #151
Thanks for bringing this up. It appears that the OpenAPI generator doesn't support Windows at all. Neither does Swift NIO at the moment. These will need to be figured out if there will be a swiftly Windows support.
It looks like this issue might at least unblock OpenAPI generator for some forward progress. I did take a look at NIO and there seems to been some progress going on as well. Would it make sense to create an issue for NIO separately? I plan to update this issue once I'm able to get past the current stage.
I don't think that it can hurt to raise an issue on NIO. They might duplicate it if there's an existing one tracking Windows support.
This is the main tracking issue https://github.com/apple/swift-nio/issues/2065. FWIW NIO should get Windows support in the next few months
This is the main tracking issue apple/swift-nio#2065. FWIW NIO should get Windows support in the next few months
That's great to hear! Is there somewhere that mentions this? The issue doesn't seem to have any recent activity to indicate that this is the case.
It was mentioned here https://forums.swift.org/t/tcrun-managing-swift-toolchains-on-windows/77580/8
Swift OpenAPI Generator supports Windows as of https://github.com/apple/swift-openapi-generator/releases/tag/1.7.2
Thanks for the update, @czechboy0!
Once I bumped the minimum versions of swift-openapi-generator and swift-openapi-runtime to 1.7.2 and 1.8.2, respectively, I'm able to hit NIO compilation errors, which is expected. I have created a small PR to bump these in order to support building on Windows going forward.