-
-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux Support #306
Comments
FileWatcher pod is no longer used for Sourcery as I needed more powerful daemon, we'll just remove it completely (I thought I already did) |
I'm not sure if you've removed it. I might still be running too old code in my tests. |
@krzysztofzablocki Any updates on this? 🙇 |
We’re using this watcher to add support for Linux in SourceKittenDaemon. It’s a wrapper of the |
Ponyboy47, the guy behind the original wrapper, has been developing a new FS Watcher here. The guy really knows what he’s doing, so maybe that’s a better option. We’ll see. |
Hi, I need this for various reasons, would you accept the patch that removes |
@mxcl I guess this is acceptable for now, but why not just commit generated code instead of running Sourcery on CI? |
Two reasons:
Well, if you aren't cool with it then I'd rather not. Since maintaining something that core don't want is not fun. |
I think it is fine as I suppose watcher does not work on Linux any way, but I didn't try it. @krzysztofzablocki you probably know better if thats the case? |
I agree with @mxcl Committing generated code seems like a very bad idea. The whole point of Sourcery is that the canonical code are your macros. If you’re committing generated code, you’re not committing canonical code. I might be wrong, but that seems like a very bad idea. |
@mxcl we'd be happy to accept a PR that enables Linux support, even without the watcher especially since its nice to have and not a critical feature 👍 I totally agree with @felix91gr I do disagree on not committing generated files in most projects, but there are few reasons behind this:
I definitely think that limiting human mistakes by having the codegen run with each build is more important than whether you commit the code or not, although I've been burned by not commiting it in the past so my recommendation is to do it for the above reasons :) |
@krzysztofzablocki I could not explain it better, completely agree with all the points (the only thing is probably LinuxMain is really not that necessary to commit, but if so, I would consider it as exception). I think we should put it in README as general recommendation. |
K great, I'll spin up my docker. |
@mxcl how did it go? I'm willing to help. I'm in need of generating LinuxMain files and already two people have pointed out to me that this is trivial with Sourcery 😅 Maybe we can make a PR to start enabling Linux support :) |
Also: @krzysztofzablocki @ilyapuchka, what's left in general to enable Linux support? |
I made some progress but it was going to be a lot more work than I anticipated, mainly because Sourcery doesn't handle |
Oh no :(
How so? |
Hello, everyone |
Any updates on linux compatibility? |
👋 Hi all I have installed ubuntu VM through tart and updated to 22.04 according to this guide. I had to run the following commands prior to being able to run
Then I was able to successfully run Unfortunately SourceryRuntime contains import of I'll continue investigation 🕐 |
We could drop CommonCrypto and use some replacement, I think this is only used for cache hash |
Indeed, there's some replacement available in swift-tools-support-core, albeit being deprecated - SHA256 |
Or SwittCrypto |
👋🏻 Hey, a little update: as it appears to be, there are a lot of issues compiling code under AST and other parts of code, mainly related to Wrapping it into #if os(macOS)
@objcMembers
#endif helps, so I am continuing this journey. |
👋🏻 Hey all, a little update: I was able to reduce number of errors down to a hundred or less, but now there are plenty in Other changes I needed to make is to disable almost all My current plan is to make it buildable, although some features will be broken. |
👋🏻 Hey all, some news: I was able to resolve all of the build errors in Sourcery, though some of the fixes I applied I'd need to refactor. At the moment I face these issues coming from
My setup:
|
I figured it out, I needed to install |
Hi all 👋🏻 Linux Support #1188 is ready for review. What a ride! It works 🔥 🎆 |
I've tried getting Sourcery working on Linux as a test. SourceKit and SourceKitten can be compiled for Linux, I've already managed that, but the FileWatcher used in Sourcery seems to be the only library that doesn't support Linux. If Sourcery moves to SPM you could fetch all dependencies except the FileWatcher using SPM and compile it.
--watch
wouldn't work, but Sourcery would be working on Linux which is good for Server Side Swift development. Anywhere a feature isn't supported/supportable on Linux you can place a#if !os(Linux)
or preferably#if os(macOS) os(iOS) os(watchOS)
.Just as an added note: I'm not suggesting this as a must for 1.0. But I'd definitely like this to be supported in the future.
The text was updated successfully, but these errors were encountered: