ASDF Systems on Syscat - an introduction (Wikipages)

ASDF

ASDF is the de facto standard build-system for Common Lisp.

It defines systems, which are analogous enough to packages that they serve that purpose for software distribution.

Quicklisp

Quicklisp was a huge advance in making it easy for people to discover and installl CL libraries in the form of ASDF systems. It rapidly became the de facto means of finding and downloading ASDF systems.

It uses cl-test-grid to distribute the load of testing 1800+ systems.

However, some limitations have revealed themselves over time:

Enter Syscat

On that basis, I'm investigating whether and how Syscat can step into the breach by providing existing capabilities such as discovery of existing ASDF systems, while adding more:

Important note: it could be hosted on another, CL-specific instance of the software. There's no reason it has to be tied to this one. In fact, a CL-specific instance is probably the better idea, so think of this as a prototype or proof of concept, rather than the definitive solution.

Further, it's possible that this entire exercise will result in the definition of a protocol, which then gets implemented on Syscat/Restagraph, and possibly in other ways as well.

Benefits of using Syscat to keep track of ASDF systems

Those I see include, among those I forgot to write down:

Possible other features/capabilities

Of course, this is just a sketch. I haven't even begun to properly look at things like

Potential issues

Library/DLL-hell

It would be possible to have one version of a library required via some transitive dependency, when at the same time you want to use another. This would be problematic.

Worse yet, conflicting versions could be required via different transitive dependencies.

Arguably, this is already possible, and graph-traversal would make it easier to find these.

Syscat would only record the versioning requirements already specified in a project; it's up to the client (and possibly its user) whether to obey them. I see value in a client that identifies these conflicts, and communicates them back to the user to decide how to resolve them.

ASDF-specific complications

Things still to be discussed/negotiated

Everything's still negotiable at this stage, but there are things I have strong opinions about, and things that need further untangling:

Marking a system's build and test status on a given platform permutation

There's no simple, single answer here. Unfortunately, this is also one thing that we'd have to handle in a single, agreed manner if it's going to be of any use. The basic options that I see are:

  1. A relationship from <system-version> to <platform-permutation> indicating the status:
    • ASDF_SYSTEM_BUILDS_ON_PERMUTATION
    • ASDF_SYSTEM_FAILS_TO_BUILD_ON_PERMUTATION
    • ASDF_SYSTEM_PASSES_TESTS_ON_PERMUTATION
    • ASDF_SYSTEM_FAILS_TO_PASS_TESTS_ON_PERMUTATION
  2. A resource/thing connected to both the system-version and the platform-permutation, which encapsulates the time-stamped results for a single client, indicating success/failure of the build and test steps.

I see advantages and disadvantages of both.

The first one is simple and clear. At first, I thought it was a bad thing that a system-version could be recorded as both working and not-working on a given platform-permutation at the same time, but there may be cases where it works for one person and not for another, most likely due to something like differences between Linux distributions. The downside is that it offers no information about who it works or doesn't work for, which makes it harder to ask follow-up questions.

The second option is richer in information, and potentially gives a proportional view of how many people it works or fails for. But would this information really be that useful? There's also the objection that a large number of failure reports could be demoralising for a maintainer, to which I'm sympathetic. It could tell the maintainer who it failed for so they can ask for more information, but library users can already contact the maintainer, so that point is moot. This would also enable secondary social effects, where people can see who is/isn't submitting reports, and from there we can get social pressure that is less than constructive.

So on balance, I'm leaning towards the first option. As you can probably tell from the very specific list above, I've already implemented it, so it also has that momentum going for it :)

Things you need to know about Syscat

Until I port the main documentation, these get listed here, to help make sense of this thing's UI, and of some of the design decisions described in this document.

Two separate types of link

You'll see these in all current Restagraph-based sites, because I built one general-purpose GUI, and deployed it everywhere.

In the backend, that text is stored as text, and that's it - no assumptions are made about the formatting of the contents. That means that if you want to build an app on Restagraph that uses, say, an XML-based markup, you can do that.

This means that there's no inherent relationship between links in the text, and database links between resources, and that will never be implemented in the backend. It'd be possible to add on some kind of helper service that automatically adds database links according to the content, and edits the text to update links when the targets get renamed, but

Named relationships

This is based on a graph database, not a relational one. Ironically, graph databases are the ones that give the relationships between things equal status to the things themselves. They make it possible to separate a thing's intrinsic characteristics from the context that gives it meaning, so you get a clearer picture of which is which.

Dependent resources

This is a feature I had to invent for Restagraph. It expresses the idea that some things only exist (or perhaps make sense) in the context of some other thing:

...you get the idea.

This is why you see two sections at the bottom of a page:

This is also why things like this source-code commit for Syscat have such ludicrously long URLs.

API-first design

The REST-ish HTTP API server is the heart of this thing; the rudimentary GUI you're looking at is 100% replaceable.

This is because I wanted to make sure that everything you can do with these systems can be done via automation; if it's in the GUI, it's already there in the API. I also wanted to make sure that people could build their own UIs on top of it, to meet their own needs. Thus, it's already possible to implement a REPL client app that uses this system.

The engine stores information - it doesn't do things

Syscat began (and continues) as a means of tracking information about things - a single source of truth.

Early in development, I considered the idea of extending it to incorporate things like network monitoring, and quickly decided that this is best left to more specialised apps, which can fetch config information from Syscat.

The closest it will come to taking action on the outside world is when I add a webhook-style feature, so that when a thing is added/changed/deleted, the engine will make an HTTP call out to some other app with that information to be acted on.

Feedback

This is just the first draft, so please feel free to provide feedback via the Fediverse (a.k.a "Mastodon"). I'm @gothnbass@linuxrocks.online.

Or you can go straight to the source (literally) and comment on this issue on Codeberg.

This document incorporates some feedback that I've already received via Fedi, and I'll continue updating it as feedback comes in. At some point it should settle into relative maturity, and that will tail off.