Community Update

DaeraxaOctober 4, 2023
  • news
  • log
  • update
About 6 min

As the leaves turn brown and the days grow shorter, make sure you draw up a chair and settle in for a nice, warm, pumpkin spice edition of the Pulsar community update!

Welcome to the October Community Update!

A warm welcome to this edition of our monthly blog post where we tell stories about what the Pulsar team and community have been up to in the world of Pulsar. This month we have a real mixed bag of things from an initial announcement of our "Pulsar Cooperative" initiative, a large code refactor of PPM, an explanation of some recent macOS signing issues and the appearance of Pulsar on Shields.io and GitHub Desktop! Enough with the prelude and let's get on with the update!

Introducing Pulsar Cooperative!

One of our main reasons for trying to continue the Atom editor project (rather than moving to another editor or making one from scratch) was to preserve the huge number of community packages that had been created for Atom over the years. Unfortunately, as development slowed on Atom (and especially when the sunsetopen in new window was announced), some maintainers seem to have either archived their packages or are no longer looking to maintain them.

The problem is that some of the more popular packages are in this exact situation and we often see members of the community asking about an issue with a package, discovering the fix and implementing the fix locally, but for whatever reason the package maintainer no longer wishes to maintain that package with Pulsar in mind.

Of course, it is always possible to fork the package and take over maintenance yourself, but not everyone wants to, or may be in a position to, maintain a package. Nor does the core Pulsar team have the ability to maintain all of these community packages as well as the main Pulsar project.

So we have come up with what we hope will be a viable solution. Pulsar Cooperative. This is a new organization that we have set up to allow joint ownership of packages. The idea is thus:

  • A package repository is archived, not accepting PRs or is not publishing any updates to the PPR (Pulsar Package Repository).
  • Somebody would like to use this package and is able to submit code to fix or improve the package but does not wish to take on sole responsibility for the overall maintenance of the package.
  • So instead, a request is made and the package is forked to the Pulsar Cooperative organization where bug fixes and new features can be added by any community member and so long as those fixes and features do not fundamentally change the package, introduce malicious code, or otherwise break functionality, they will be accepted and a new release published automatically.

We hope to introduce a place where people can cooperatively work to make the Pulsar ecosystem better without having to worry about violating the strict vision for a package and not having their fix even accepted. It is also a place where people can submit fixes and make their favourite packages functional again without necessarily having to take on full responsibility for the ongoing maintenance.

This is not a "Pulsar team" project in the sense that members of the main organization are going to be providing bug fixes or updates in response to logged issues (of course they are free too, just like any other community member). This is an entirely community-led endeavour and we hope everyone will be encouraged to get involved!

This isn't ready just yet, but look out for an update right here on the blog (or any of our other community areas) once we are fully live and ready!

Modern Tree-sitter blog posts

[1]

If you hadn't already seen or read them, @savetheclocktoweropen in new window has been writing a series of blog posts that go into detail about all the work that has been going on in Pulsar to support a modern implementation of Tree-sitteropen in new window. Parts oneopen in new window and twoopen in new window are available right now and keep an eye on the Pulsar blog for more updates!

Converting PPM's code from callbacks to async

Community member @Nemokosch/@twocoloursopen in new window  has been spearheading the conversion of our PPM codebaseopen in new window to upgrade old JavaScript callback style to modern ES6 async/await.

The PPM repo, while modern and accepted when written, is now mostly viewed as being outdated due to the pervasiveness of deeply nested callbacks. In some instances having nesting six levels deep, and as anyone who's been programming in JavaScript prior to ES6 knows, this can be cumbersome, difficult, and frustrating to work with. That is exactly why the effort has been made to convert the entire codebase into a shallow nested, early return patterned, modern ES6 source utilizing async/await properly. In hopes that a greatly simplified codebase can pave the way for easier modifications in the future.

To show what we are talking about, take this (simplified but real) code as an example:

From this:

this.registerPackage(pack, (error, firstTimePublishing) => {
	if (error != null) {
		return callback(error);
	}

	this.renamePackage(pack, rename, (error) => {
		if (error != null) {
			return callback(error);
		}

		this.versionPackage(version, (error, tag) => {
			if (error != null) {
				return callback(error);
			}

			this.pushVersion(tag, pack, (error) => {
				if (error != null) {
					return callback(error);
				}

				this.waitForTagToBeAvailable(pack, tag, () => {
					if (originalName != null) {
						rename = pack.name;
						pack.name = originalName;
					}
					this.publishPackage(pack, tag, { rename }, (error) => {
						if (firstTimePublishing && error == null) {
							this.logFirstTimePublishMessage(pack);
						}
						return callback(error);
					});
				});
			});
		});
	});
});

To this:

const firstTimePublishing = await this.registerPackage(pack);
await this.renamePackage(pack, rename);
const tag = await this.versionPackage(version);
await this.pushVersion(tag, pack);

await this.waitForTagToBeAvailable(pack, tag);
if (originalName != null) {
	rename = pack.name;
	pack.name = originalName;
}

try {
	await this.publishPackage(pack, tag, { rename });
} catch (error) {
	if (firstTimePublishing) {
		this.logFirstTimePublishMessage(pack);
	}
	throw error;
}

This has been a huge piece of work, which began because they overheard complaints about the PPM codebase being hard to read and understand due to its outdated style. As they had already previously assisted in PPM with the "decaffeination" of the codebase, they were already fairly familiar with it and thought they could help further by "upgrading" the codebase to this modern style.

There has been a lot of focus on code flow during this conversion in order to make the codebase as easy to read and understand as possible for future contributors. Not only was the structure changed, but some code and modules could be removed entirely as their only purpose was to support the previous callback style.

From a Pulsar user's perspective you shouldn't notice anything different at all. This is all about maintenance and modernization of the codebase. We want to make Pulsar as hackable and as easy to contribute as possible and these kinds of efforts go a long way to achieving that goal.

So a big thank you again to [@Nemokosch] for working on this. You can see the progress in this pull requestopen in new window

macOS binary signing issues

We discovered an issue recently where it turned out that our macOS binaries weren't being signed by our CI process. After some investigation and changes to the CI environmentopen in new window by @DeeDeeGopen in new window, @confused-techieopen in new window and @Meadowsysopen in new window, the binaries are now correctly signed again.

This issue would only have affected the 1.109.0 releases; the current and upcoming releases will all be signed as normal.

Shields.io badges

Thanks to @confused-techieopen in new window and the team at Shields.ioopen in new window, badges for Pulsar packages are now available! This means that if you make a package for Pulsar and publish it to the Pulsar Package Repository, you can now display download and stargazer stats on your README page.

Stats can be shown both for downloadsopen in new window and stargazersopen in new window. Here is an example of a downloads badge for x-terminal-reloadedopen in new window:

Pulsar Downloads

So go grab your badges now to show off your package's stats!

Pulsar on GitHub Desktop

For those of you who use GitHub Desktopopen in new window you will now find (or will soon find) that Pulsar is available as an option for you to select as your editor of choice!

Thanks to @mdibella-devopen in new window for adding this for the macOS version, @confused-techieopen in new window for Windows and @Daeraxaopen in new window for the Linux version!

Community spotlight

This month we want to give special attention to @Nemokosch/@twocoloursopen in new window with their changes to the PPM codebase already discussed on this update. We love to see these kinds of contributions to Pulsar!


And that wraps things up for this month. We hope you have enjoyed reading about all these changes and updates to Pulsar-related areas. As always, a huge thank you to all of our wonderful community members and a special thanks to all those who donate to the project, which makes this all possible. We hope to see you here again next month!


  1. Image from https://tree-sitter.github.io/tree-sitter/open in new window - Copyright (c) 2018-2021 Max Brunsfeld ↩︎