Skip 2 and beyond #755
Replies: 4 comments 7 replies
|
Thanks for writing this up and all the thought you put into it. Here are my rather disorganized thoughts on the proposal under consideration (henceforth referred to as the "PUC"): Skip's current architecture of the core modules (from For example, in the scenario where we need to make a simple fix to a skip-lib function (like, say, @fhasse95's skiptools/skip-lib#52 from a few weeks ago). The CI completes in 30 minutes, and an independent release can be tagged without having to worry about what other outstanding changes are staged in unrelated modules. If we were to mash everything into one giant monorepository, any little fix or improvement to any one component would wind up triggering the test suites all across the board, and it would take many hours (and almost guarantee that one of the frequent flakes from repositories like Another area where this bites (and which the PUC does not seem to have taken into consideration) is that we often want to cut a new module release just to bring in an updated Kotlin dependency declared in the module's In short, SwiftPM's design of "whole-repo" tagged releases is simple (or perhaps simplistic, when contrasted with Rust's ability to have a single repository contain multiple separately-versioned crates), which makes monorepositories containing multiple Swift modules a very thorny prospect. This fundamental design limitation of SwiftPM has been discussed going way back to 2016 and again in 2020, but at this point I don't think it is ever going to change. And for the record, our earliest prototypes of Skip used a monorepo for both skip and all the core modules, and we quickly split it out into multiple separate repositories due to the above issues. I agree that being able to have a single atomic commit make a change across, say Which isn't to say that our current split is perfect by any means. For example, maybe All that being said, there are definitely some repositories that should be merged. I think that Touching on the JNI and As for Regarding the PUC, let's consider our motivation behind it. What parts of it improve Skip for the end-user of the apps that Skip can produce? Will the resulting Android apps be better (faster, smaller, more efficient, or less buggy) as a result of implementing any of these things? Or is it more a wishlist for smoothing developer ergonomics and increasing development velocity? Skip's development process certainly has a lot of painful friction, rough edges, and foot-guns, but that's more of an "us problem" than a "Skip app problem". And I do think there are many things that we could do to help streamline the development process from a tooling and automation perspective (especially around coordinating simultaneous changes between the lite/fuse side of things, like changes that affect both
or:
And if we are frustrated by the slow CI (mostly due to the 5-concurrent limit on macos runners for free accounts), nothing should prevent us from ponying up the money to upgrade our plan to enable more capacity. Glomming together all the repositories into a single one would only make CI unit/integration testing slower and more prone to flakes. To summarize, I think the PUC has a lot of good intentions, but overall has a fairly shallow understanding of the current architecture of Skip and the history of how it got to where it is right now. It is more of a "here's a big developer wishlist, some of which would break stuff for everyone, so let's just call it 2.0". All of the problems it seeks to address are valid (and I certainly have chaffed against each and every one of them myself), but many of them can be dealt with individually in a measured way rather than lumping them all together artificially. In my view, a compatibility-breaking Skip 2.0 release should only be justified by changes that ultimately help improve the experience for the users of the apps, not things that simply help ease the development process. My recommendation would be to split up the problem statement that yielded this PUC into multiple separate issues and track them individually rather than all at once. And it may very well be the case that one or more of them would logically necessitate a compatibility-breaking Skip 2.0, in which case we can start planning on that. |
|
Answering the swift-java parts also with my "Swift project" hat on:
Yes please, it would be good to actually leverage this that we had argued for a long time to do the split, and it came at a complexity cost, so it'd be good to reap the benefits of the split at least :)
We're more than open to extending and supporting anything you might need, but it'll mean collaboration and some folks will have to help out, I don't think I'm able to just ship all features you'd like -- we'd require some collaboration and also learn from your experiences in Skip. We are also splitting out the "target language agnostic" core of swift java right now into https://github.com/swiftlang/swift-binding-generator-core which will contain the module So the plan is that we could easily have a I wouldn't even mind discussing extending swift-java to have a kotlin output mode, we can definitely talk about it if we think that'd be easier to maintain. But I would very much request some folks help in maintaining that if we were to take that on. Granted, agents make these things much easier nowadays, but still there is experitise needed to determine which shapes of APIs to produce etc. We found that even with agents, these interop libraries/tools provide a lot of value, especially when they're solid/well-tested and then an agent can "use this interop lib to interop with " -- I think that's likely the optimal way to approach this. As we've seen one-off interop approaches devolve over time. Long story short: please reach out and let's figure out how we can offer a great experience! |
|
Thanks a lot @marcprux and @ktoso for your contributions to the discussion! Agreed on splitting this into separate issues; let me go through the points one by one:
|
|
I think SKIP 2.0 may be a good opportunity to change how SKIP interacts with SKIP 1.0 generates it's own bridge for objects that are marked with the A more "correct" implementation of Observation is possible, and would unlock a lot of functionality, including many 3rd party libraries that rely on the public Observation module. In SwiftUI, the mechanics behind invalidating a In order to track changes and properly re-render, skipstone can install something like this at every View boundary:
The important things this unlocks are that an This unlocks a lot of popular libraries, such as These all rely on the Observable protocol, not the macro, and will not want to become SKIP aware. I also would expect that this wouldn't have a lot of impact on peoples applications. The SwiftUI side of a SKIP app already relies on the built-in mechanism, and this change would bring it inline with that, hopefully reducing the bug surface |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I want to propose some short and long term goal for this project, and i would be happy to lead the way if you all think its a good idea:
First goal is to make Skip simpler to build, test and maintain. For this, I propose a unification of SkipUnit, SkipLib, SkipFoundation, SkipUI, SkipModel, SkipBridge, SkipAndroidBridge, SkipFuse and SkipFuseUI in one single repository and Package, bumping the major version to Skip2.
The long term goal would be to eventually converge with the official Swift on Android toolchain, with Skip adding the extras (like SwiftUI on Compose) on top. This would be a Skip3 milestone.
swift-javais not as feature complete as SkipStone so we would have to contribute A LOT of code there.For more details, please check out the skip-2.0-plan.md.
All reactions