Edge release channel changelog

For those tracking the v2 builds, let me use this topic to post a few updates as I push them:

  • I just merged the two datastores that were previously used into one, in effect this will mean that when you upgrade to the latest v2 build, a full resync will happen.
  • I’ve renamed the Debug: Reset Client command to System: Wipe Client and fixed some issues with it (it used to get stuck).
  • I just improved Lua parse error reporting, it should have a better pointer to where the issue is now.
10 Likes
  • I did some work on the Lua-JS interop layer, hopefully this didn’t result in any regressions. Let me know if you notice anything (if anywhere: likely when using syscalls from Lua)
  • The Share plug is now gone, I’ve been thinking of removing this and replacing it with something else which happened, because…
  • I implemented new Import and Export infrastructure, I’ll start a separate topic on that in a few minutes.
1 Like

I just exposed the browser’s window object to Space Lua via js.window, so… the sky is the limit now. And you even get auto complete for it.

4 Likes

I think this is awesome! It will be amazing when some examples of using this come through, my js-fu is not strong enough

I’m in a heavy cleanup stage preparing for a v2 release. So some (possibly) breaking changes ahead.

Shortcuts

The shortcuts configuration is now gone, it has been replaced with command.update allowing you to “patch” existing commands, which should be the 90% use case. See Library/Std/Command for examples on how to use it to set custom key bindings (or unset existing ones).

Action buttons

I just made a breaking change to the actionButtons configuration option. Rather than letting it redirect to existing commands, I replaced this with simply having a run callback which is much more flexible. See silverbullet.md’s own CONFIG for an example on how its action buttons are configured.

Markdown preview

Has now been removed. This was basically a legacy feature from the days that Live Preview didn’t exist. It was always half-working and rather ugly. The remaining use case was the “Print” button, but I think this can better be reimplemented with a export to PDF option later.

5 Likes

I just added a actionButton.define command for more convenient (and distributed) creation of action buttons: Library/Std/Action Button

1 Like

Breaking change for those that used the HTTP API

All file actions are no longer served from the root, but from /.fs

So, before to access the index.md file you’d request /index.md this is now /.fs/index.md.

After upgrading to the latest build, be sure to refresh the client twice to get the client using the new endpoints.

I’ve just replaced the previous SB_APT_PACKAGES configuration with a nicer system, namely the CONTAINER_BOOT page. Simply put bash shell commands in there, and they will be run upon (docker) container boot. Useful to install additional ubuntu packages.

Example:

I haven’t removed the SB_APT_PACKAGES support (yet), but did remove the documentation for it.

1 Like

Head’s up: I’m working on a rearchitecture of the sync engine. Not sure when I’ll merge that yet, but when I do it will mean clients will be reset and have to resync all content and reindex the space. If you don’t want this to happen before the proper release (likely 2.1), I recommend you switch to the :latest Docker tag now (instead of :v2 which is updated with main)

2 Likes

Ok, I’ve just merged the new sync engine: Sync engine rearchitecture by zefhemel · Pull Request #1516 · silverbulletmd/silverbullet · GitHub

To properly upgrade, make sure you do the couple-of-reloads dance to make sure everything updates. As warned, this should trigger a full resync (black progress circle) and reindex (blue progress circle).

Since this is a significant change to a critical part, I implore you all to please, please please make backups of your space. I’ve tested this a lot, and I’ve been living on this branch for about a week now and encountered no data loss, but still please, please, please backup backup backup.

For those monitoring the JavaScript console regularly:

One thing that’s kind of annoying is that Firefox and Safari do not show Service Worker logs in your regular JavaScript console to see what the sync engine is doing (Chrome based browsers do).

To access logs in Firefox, go to: about:debugging#/runtime/this-firefox and scroll down to the Service Workers, pick the right one (it will be marked as Active) and click “Inspect” to see the logs.

In Safari: Develop menu > Service workers

Some docs on new architecture: Architecture and Sync

2 Likes

I have a feature-complete replacement backend written in Go: Go backend by zefhemel · Pull Request #1555 · silverbulletmd/silverbullet · GitHub (rationale here: Rewrite server in Go or Node.js · Issue #1549 · silverbulletmd/silverbullet · GitHub)

This will replace the old (Deno) based backend. It is part of a larger project to slowly move away from relying on Deno, and move to more main stream tools.

This should not be noticable from a user perspective, except using far less memory and probably being faster (although this is just the backend, which doesn’t do all that much). It also unblocks moving to e.g. Alpine based docker images, which are going to be much smaller.

Currently I’ve switched to this branch (you can test it by using the :v2-go docker tag) for my personal instance. If it all works fine for a few days, I’ll merge it into main.

1 Like

I have just merged the Go backend, which means that the Deno server is now gone.

I also used this opportunity to restructure the code base a little bit: Reorganize code base · Issue #1556 · silverbulletmd/silverbullet · GitHub

If you’re working on the SB code base, please review the updated Development page, which lists the tools to use and commands to run (these have also changed a little bit).

2 Likes

Breaking change for those heavily relying on the Docker ubuntu base image: I’ve now swapped out the base image for Alpine, which is much (like 10x) smaller. This means installing packages via APT no longer works and now needs to happen with apk, see: CONTAINER_BOOT for an example.

1 Like

Head’s up: I just merged (optional) client encryption: Client Encryption

Part of this is that I cleaned up and rewrote some logic that determines the local database name used (so that it can also be based on encryption keys etc.) this means that once you upgrade another full sync + index cycle will kick off on first load. Sorry for the inconvenience. I try to minimize this from needing to happen, but it was the cleaner approach.

5 Likes

Ok, big push to main just now (soon will be in on the edge builds):

See CHANGELOG for details

Decided to do this after today’s release, but I just removed full text search from SilverBullet’s core. It dramatically slows down indexing speed and quality is quite poor. You should use @MrMugame 's Silversearch instead. If you want it back, you can install it as a library: GitHub - silverbulletmd/basic-search: Basic full-text search for SilverBullet (previously a built-in plug)

5 Likes

In case you don’t know it yet @zef, I just stumbled upon this project: https://github.com/nextapps-de/flexsearch. Could this be an option to improve the performance of full-text search?

1 Like