News for hackers. Stuff that matters.
Re:Marta, file manager for macOS, goes beta by saagarjha on Friday March 30, 2018 @07:38PM (#16720694)
So, I see a plugin API for this, as well as a sample Swift plugin: https://github.com/marta-file-manager/HelloWorldPlugin. How are you making this work? As far as I know, creating plugins in Swift is a bad idea because trying to load two of them with incompatible runtimes (a likely possibility, since Swift doesn't have a stable ABI) would cause bad things to happen.
Re:Marta, file manager for macOS, goes beta by yanex on Friday March 30, 2018 @07:51PM (#16720756)
Well, until Swift introduces ABI compatibility, this is definitely a problem, as both Marta API and a plugin need to be built with the same version of Swift.

Depending on the Swift release roadmap, I'll postpone 1.0 until the release of Swift 5, or make the API ObjC-compatible.

I also have plans for making a "lightweight API" (possibly in Lua). It will support only the subset of features available in the "full API", but if that would be sufficient, nothing prevents it from becoming the "right" way of writing plugins for Marta. (In any case, Swift API won't disappear).

Re:Marta, file manager for macOS, goes beta by saagarjha on Saturday March 31, 2018 @04:59AM (#16722445)
> both Marta API and a plugin need to be built with the same version of Swift

As far as I’m aware, this isn’t a problem, since your communicating between the two using the Objective-C runtime, which is resilient to the underlying ABI because it essentially overlays its own. The issue arises when you have two plugins with incompatible versions of Swift: in this case, each will load its own standard library, which will lead to conflicts since for any given function in the shared library one of the implementations has to “win out”. This will cause at least one of the plugins to be unable to interface with the standard library correctly.