Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Support Linux#43

Merged
liamnichols merged 7 commits intomainCreateAPI/CreateAPI:mainfrom
ln/linuxCreateAPI/CreateAPI:ln/linuxCopy head branch name to clipboard
Jun 30, 2022
Merged

Support Linux#43
liamnichols merged 7 commits intomainCreateAPI/CreateAPI:mainfrom
ln/linuxCreateAPI/CreateAPI:ln/linuxCopy head branch name to clipboard

Conversation

@liamnichols
Copy link
Member

@liamnichols liamnichols commented Jun 27, 2022

Background

While most use-cases evolve around Apple Platforms, there are still benefits to being able to use CreateAPI to generate Swift source code on Linux machines.

For example, a workflow could produce and publish the Swift package whenever a shared OpenAPI schema document is updated, but it might be more cost effective to run that flow on Linux instead of macOS machines.

Changes

Most of CreateAPI relies entirely on Swift itself and nothing within the Apple ecosystem so this was a pretty straightforward change.

The only limitation here is that the FileWatcher dependency that is used for the --watch command does not support Linux. As a result, I decided to conditionally exclude this functionality when building for Linux.

While ideally I would like to support Swift 5.5 on Linux too, it for some reason is not possible to access Unicode.Scalar.Properties.isEmoji which causes the build to fail. I didn't find much on the internet besides this: https://forums.swift.org/t/swift-include-icu4c/39790/12. My focus here is mostly on maintaining a minimum level of Linux support rather than forcing 100% compatibility in unreasonable ways so I think its fine to skip 5.5

@liamnichols liamnichols self-assigned this Jun 27, 2022
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@liamnichols liamnichols marked this pull request as ready for review June 29, 2022 11:40
@liamnichols liamnichols requested a review from imjn June 29, 2022 11:40
@liamnichols liamnichols merged commit dd6f59a into main Jun 30, 2022
@liamnichols liamnichols deleted the ln/linux branch June 30, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.