Bringing back lively.app
#988
Labels
✨ enhancement
New feature or request
🏥 help wanted
Extra attention is needed
💬 ideas welcome
For feature ideas where more input on design decisions and conrete direction are warranted.
In the past, we ran into situations where a missing rebuild or an outdated version of
git
lead to problems. This happened multiple times and with technically-able users. Aslively.next
has the explicit goal of fostering collaboration between designers and programmers, I think this constitutes a call for action on our side:Retrieving a working
lively.next
setup and keeping it up to date needs to become easier. Now, it is a bit ironic that we only recently scrapped the attempts of a workingdocker
setup we had. But in any way I do not thinkdocker
constitutes a good solution to this problem (and it never meant to), as the end result would again be people needing to copy-paste somedocker
commands they do not understand.I though about two ways to tackle this:
Server Driven Approach
I think we would actually have everything ready for this to function. Actually promoting this would probably require us to spend (significant?) amounts of time thinking about user separation and other security measures, but for a select group of users that would be of less importance, I'd think.
However, I see some major downsides to this approach:
lively.project
is still in its infancy, I have worries that users might loose data and cannot easily restore/save/backup parts of their work whenlively.project
falls flat under them.Stuff like spontaneous builds would also become much harder, forcing each retrieval of an artifact to go through GitHub. I have automagical actions for this nearly ready, but it would still constitute an annoyance.
lively.app
This leaves us with the option of a prepared lively application that can just be installed/executed like any other program.
Concretely, this would mean providing an electron app or something similar (more on that later).
Dependencies
The most obvious hurdle to take is that, at the moment, we require quite a some dependencies. As these are to be installed as native applications, we cannot just bundle them up (at least not with far too much involvement, i.e., thinking about platforms, following release cycles,...). Let's consider our list from the
README
:These are actually important. More on that below.
These are only used inside of various scripts (mainly the bulk testing script and the artifact checker). I'd argue that these are not important for the average user. The overall goal of this undertaking should not be to move everyone onto the app, but the workflow of us as core developers will probably remain unchanged. Thus, we can just ignore those, when thinking about app support.
Here, I am unsure. Looks like the freezer already uses this via a npm library - correct, @merryman?
We provide spelling correction via a command inside of lively. While I think this feature is overall quite bare-bones at the moment and could use some love in general, we do not have any special requirements that I am aware of, so we will be able to switch to some JS library (there are plenty of options).
How to Create an Executable
As we need to bundle a
node
application, we will need to use something likeelectron
,nw.js
orpkg
. There are other tools available, but these are the ones I looked at. Using any one of these will take care of our node dependency.Which tool to use?
From looking at it,
electron
seems to be the best documented of the ones listed here. I'd prefer using that, to be honest. An additional benefit of usingelectron
would be that we would probably come quite far with thelively.app
basis that we already had in the past. The only advantage I would see with usingnw.js
is that we were thinking about bundling a complete lively app at one point, that utilizes the option of calling thenode
API in the browser, to get an improved debugging experience inside of lively. Pursuing this idea would then require another switch.git
This leaves us with our dependency on
git
, which has become quite the dealbreaker since the introduction oflively.project
. While I think installing this would be alright, even for non-technical users (we could still improve our installation instructions), we could also experiment with getting rid of calls to a nativegit
application from within the client.For this, I looked at the available
JS
/node
libraries for git. The best option we have (sincenodegit
seems to be a nightmare in with regards to interoperability) seems to beisomorphic-git
. With that it is possible to operate directly on a git repository in agit
compatible way, i.g. actual files get manipulated, which is what we'd want. I identified the following blockers:isomorphic-git
does not provide all operationsgit
provides and the output is obviously different. Before proceeding we thus should:isomorphic-git
needs a FileSystem in order to operate. Onnode
side, one can just usefs
. This is the easier option, but it would mean that we would need to useevaluateOnServer
quite often and I am undecided how desirable that is. The other option would be to experiment with writing ourShellClientResource
in a way that it fulfills the requirements thatisomorphic-git
has with regards to a file system. The list of operations that one needs to support is the following (taken from here):isomorphic-git
. We shouldisomorphic-git
for pushing and pulling makes the use of a proxy mandatory.isomorphic-git
provides one that can be used for "small projects and testing". It might also be thatmakeProxied
suffices.Summing up, I think a good approach would be to provide an electron app and utilize
isomorphic-git
in order to not need a nativegit
installation forlively.project
to work.However, I understand this post merely as an (extensive) starting point for a discussion on how to proceed. I deem this problem to be quite complex and would like to minimize the risk of quick shots.
The text was updated successfully, but these errors were encountered: