terhechte/SourceKittenDaemon

Simplified Dependencies

Closed this issue · 3 comments

Hey,

In line with #55 I'd like to simplify our dependencies a bit. The current Packages stem mostly from the original implementation where the SPM landscape was less vibrant. Most importantly, I'd like to replace Vapor with something much more lightweight as we're currently importing a ton of unused stuff via Vapor. In addition to that, we also don't need the speed or flexibility that Vapor provides.

I wanted to find something which is lightweight (very little additional dependencies), works on macOS and Linux, is kinda well supported, and maybe offers async usage and a sane API.

I did some research, and thought about these three alternatives:

  • Just use Vapor's HTTP module instead of all of Vapor:
    The downside here is that it still has a couple of additional dependencies and using it is a bit cumbersome as it is primarily intended for usage within the context of the Vapor framework.
  • Use the Zewo Server:
    https://github.com/Zewo/HTTPServer
    This is very modular, but, just like Vapor's HTTP, it also has a couple of addiontal dependencies.
  • Use Embassy
    https://github.com/envoy/Embassy
    This is very lightweight which is cool. It is also fundamentally async, which might help with certain editors. The downside is that I'm not sure how well maintained it is. On the other hand, SKD also isn't the best-maintained project on Github, so maybe that'd be fine.

Opinions on this? @nathankot ?

Cheers!

I've created a test branch that replaces Vapor with Embassy. If somebody wants to play around with it, it can be found here:

#61

Hmmm does Vapor not work on Linux? TBH I'm leaning towards keeping Vapor or just de-prioritising this - not immediately seeing the gains here, and Vapor does seem like a stronger bet in terms of whether or not it will still be around in the future.

On the flipside if you find that Embassy works better I'm all for it!

Closed as per #61 :)