Sc-Deken - a take on unified package management

I’ve thought a bit about package management and prototyped sc-deken, a cross-platform package manager for SuperCollider with a supercollider UI that handles both server plugins (UGens) and quarks in one searchable window. Plugins come pre-built for some platforms and supercollider API versions but can also be built locally on your system for other combinations.

Why yet another package manager?

  • Quarks work well for sclang code but it clones git repositories and has no concept of per-platform binaries. Compiled UGens are not a good fit for the system.
  • sc3-plugins ships binaries as one big bundle on its own release schedule. The monolitic sc3-plugins repository causes some maintenance burden.
  • Mads Kjeldgaard’s plugins.quark (GitHub - madskjeldgaard/plugins.quark: A package manager for SuperCollider plugins · GitHub) made for a good start: a curated directory of UGens with a Quarks-style GUI that downloads and compiles them for you. There were some drawbacks: It offers no pre-built binaries so every install is a build. It only handles plugins, not quarks. The recipes in plugins.quark are executable code, which I didn’t particularly enjoy.
  • Pure Data’s deken, which inspired the name, shows how pleasant ready-made binaries can be, but there the authors build and upload packages themselves, which nowadays causes security concerns.
  • There was no mechanism yet to warn users about problematic packages (e.g. badly broken or containing malware).

sc-deken tries to take the best of many worlds:

  • Quarks-style UI in supercollider. Screenshot
  • Recipes for builds are plain data reviewed in a public repository.
  • Binaries are built by trusted tools (GitHub CI) from approved commits, not uploaded by individuals.
  • The package list is signed, and every download is checked against its checksum.
  • When no binary exists, it falls back to a guided local build, much like plugins.quark.
  • It doesn’t replace Quarks: quark installs go through SuperCollider’s own Quarks code.
  • Easy to use, easy to suggest missing packages from the UI (but they are not automatically added until appoved by a human reviewer).

Features

  • Unifies searching, installation and management of Quarks (with their dependencies) and plugins (and hybrids), the code of which is individually maintained in many scattered repositories.
  • Search by name, summary or UGen name. Type “FM7” and it finds sc3-plugins. Building and updating the search index is fully automated and stored on github.
  • Prebuilt downloads for Windows, macOS (universal) and Linux (x86_64 and arm64), built by GitHub CI. You don’t need a compiler on standard platforms. (Note: I cannot sign binaries, this is a functional proof of concept).
  • Build and install on your own computer if no download exists. The user interface should tell you which tools are missing on your system to do the build, and how to install them.
  • Updates, and warns when a package is withdrawn (e.g. malware or broken). Nothing is deleted from your computer without asking: replaced copies go to a backup folder, removed ones to quarantine, renamed so they cannot be loaded “by accident” if the backup folder is added to the supercollider search path.
  • Everything is scriptable: Deken.search(“fm”), Deken.install(\portedplugins), Deken.update(…).
  • Maintenance is minimized: github automatically scans for new tags in the tracked quarks/plugins and creates pull requests to update the list. Search index is automatically built and kept up to date. Pull requests for adding or modifying packages (recipes) does need to be approved explicitly by a maintainer.

The list has about 390 packages today: 25 reviewed by hand, 310 from the official quarks directory, and the rest some unreviewed ones found on GitHub.

Unreviewed packages are hidden by default, and installing one asks you first, naming the repository and commit that would be built.

Is your favourite package missing?

The “Suggest a package” button opens a short form. You fill it in and automatically a pull request is created.

These pull requests must be reviewed and merged manually to reduce the risk of adding spam and malware.

To try it (SuperCollider 3.13+, for now tested only on windows and linux as I don’t have a Mac):

// in scide
Quarks.install("https://github.com/shimpe/scdeken"); thisProcess.recompile;
// after the recompile:
Deken.gui;                                                                                                  

@dscheiba what do you think of this?

@shiihs I think this is a bit of a slap in the face to those already working on such issues. I think AI actually makes it even more important that we all communicate and work together as a developer community, rather than duplicating each other’s work, particularly when several of the core issue haven’t been thought through.

I’d really encourage everyone who wants to contribute to pop along to a developer meeting, start on issue on github, or just otherwise discuss issues and solutions first ensuring we all know what everyone is working on. If anyone is confused by how they might get an issue discussed at a meeting, starting an issue on github and asking for it to be discussed is pretty good way to go about this.

5 Likes

Congrats, but this feels a bit defeating b/c I also worked on a package manager (called magnet) for two years and wanted it to release it for a small testing group at the end of this week such that it is available w/ the new sc version and doing crunch time on it r/n.
I was writing about it in some GH issues and talking about it in the dev meeting and chat, but didn’t want to expose it too much to the forum yet b/c of pressure/sc4-thread-alike.

It feels pretty pointless to work on stuff these days.

I haven’t used deken in ages, so I forgot how it actually works b/c I was focussing my research more on bundlers/indices from other programming languages such as cargo, npm, uv etc b/c my main motivation of magnet is (or was?) to provide a re-producible environment - i.e. there is a file which describes the current environment and that can be shared to re-produce environments, which basically allows for “one click setups” to be shared w/ others - and this recursivey, such that projects (e.g. compositions) and packages (e.g. server plugins, quarks) simply live in the same environment, but only the latter is published on the index.
I haven’t found anything about this in the docs yet, e.g. how transient dependencies are resolved.

While package managers can solve some technical issues, they can’t resolve social issues - i.e. adaptation rate is also highly important for a working ecosystem - having a split ecosystem is not good IMO.

3 Likes

I see. I’m really not interested in duplicating someone’s efforts or stealing someone’s thunder, I actually did do a search on the forum and in supercollider issues but didn’t find anything recent that I thought was relevant (I did see some meta-issue about creating standalones which mentioned packages, but I didn’t read it in much detail because it mostly seemed like a different topic).

From my point of view such package manager was one of those “nice to have, but a lot of effort and no one really wants to spend time on it” projects.

Anyway, no real harm done I think: I consider my tool to be a proof of concept, nothing more. You can continue and adopt Magnet as planned, or you can see if sc-deken made some decision that you could reuse in one form or another. It’s all good with me.

3 Likes