Skip to content

perf(snap): package the release's .deb instead of compiling Markpad again - #579

Merged
PathGao merged 1 commit into
masterfrom
perf/snap-packages-the-release-deb
Aug 11, 2026
Merged

perf(snap): package the release's .deb instead of compiling Markpad again#579
PathGao merged 1 commit into
masterfrom
perf/snap-packages-the-release-deb

Conversation

@PathGao

@PathGao PathGao commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

build.yml compiles Markpad on ubuntu-24.04 and uploads a .deb. snapcraft.yaml then compiled it a second time inside LXD, from the same source, on core24 — which is Ubuntu 24.04.

What that cost

Time. Measured on run 31481634640:

10:24:19  Building markpad
10:32:34  Staging markpad     ← 8m15s of a 14m55s pack, compiling what already existed

Two different binaries. Two independent compilations of one source produce two artifacts. A snap user and a .deb user on the same version did not have the same file, and nothing said so.

Everything #566 and #577 were about. Compiling here is the only reason this file ever held rust and node. Four release-blocking failures came out of that: #566's rust-deps, then runs 31479631082, 31480354438 and 31481081985, narrowing down how to satisfy snapcraft's rust plugin. None of it has anywhere left to go wrong, because none of it is here.

What replaces it

markpad:
  plugin: dump
  source: markpad.deb
  source-type: deb

The .deb already carries everything the part was hand-assembling:

usr/bin/Markpad                                     was: install -D from target/release
usr/share/applications/Markpad.desktop              was: a heredoc in override-build
usr/share/icons/hicolor/32x32/apps/Markpad.png      was: install -D
usr/share/icons/hicolor/128x128/apps/Markpad.png    was: install -D
usr/share/icons/hicolor/256x256@2/apps/Markpad.png  was: never installed at all

snapcraft.yaml goes from 113 lines to 82, and #577's comment about which carrier of rustup works stops describing anything the file still does.

The version comes from dpkg-deb -f markpad.deb Version, not from package.json, so the snap cannot be labelled a version it does not contain.

Verified before writing it, not after

The .deb's payload is listed above. The binary names 16 libraries in DT_NEEDED, with no RPATH or RUNPATH:

supplied by libraries
core24 base libc.so.6 libm.so.6 libgcc_s.so.1
the gnome extension libcairo libfontconfig libgdk-3 libgdk_pixbuf-2.0 libgio-2.0 libglib-2.0 libgobject-2.0 libgtk-3
stage-packages, already declared libwebkit2gtk-4.1 libjavascriptcoregtk-4.1 libsoup-3.0
none of the three, on paper libssl.so.3 libcrypto.so.3

Fourteen of sixteen have a home. Rather than add libssl3t64 to stage-packages on a guess, test_snap.yml now promotes snapcraft's missing-dependency report from a warning in a several-hundred-line log to a failed step. If those two are genuinely unplaced, this pull request's own pack job says so by name.

That check reads snapcraft's wording, so a reworded warning would pass silently. Running the snap is what catches that, and needs a display — the Linux smoke test is where that belongs, and it is not in this pull request.

test_snap.yml

A pull request has no release of its own, so it takes the latest release's .deb. What is under test here is snapcraft.yaml, and a .deb is a .deb; the snap it produces is thrown away.

publish-packages.yml pins its download to $TAG and to the exact name build.yml uploads — not latest, and not a pattern that could match another architecture — because "the Snap Store serves what the release page serves" now rests entirely on that one step. There is a test holding it to that.

Tests

npm test — 973 pass. One test deleted rather than rewritten: the snap build can find rustup has nothing left to assert. the snap build installs the locked dependency graph too becomes the snap ships the binary the release shipped, not a second build of it — the lockfile promise is structural now, rather than something a second npm ci has to be trusted to honour.

🤖 Generated with Claude Code

…gain

build.yml compiles Markpad on ubuntu-24.04 and uploads a .deb. snapcraft.yaml
then compiled it a second time inside LXD, from the same source, on core24 --
which is Ubuntu 24.04. Measured on run 31481634640: 8m15s of a 14m55s pack.

The cost was never mainly the minutes. Two independent compilations produce two
different binaries, so a snap user and a .deb user of the same version did not
have the same file. And compiling here is why this file held rust and node,
which is what #566 and three runs on #577 were about. `plugin: dump` with
`source-type: deb` removes the compiler, the toolchain, and the hand-written
desktop file and icon installs -- the .deb already carries all three, including
a 256x256@2 icon this file never installed.

The version comes from `dpkg-deb -f markpad.deb Version` rather than from
package.json, so the snap cannot be labelled a version it does not contain.

Verified before writing any of it: the .deb's payload is usr/bin/Markpad, the
desktop file and three icons, and the binary names 16 libraries by DT_NEEDED
with no RPATH. core24 covers libc, libm and libgcc_s; the gnome extension
covers the GTK and glib stack; stage-packages already covers webkit, jsc and
soup. libssl.so.3 and libcrypto.so.3 are covered by none of those three on
paper, so test_snap.yml now fails on snapcraft's missing-dependency report
rather than leaving it as a warning in the log.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PathGao
PathGao merged commit afd345d into master Aug 11, 2026
5 checks passed
@PathGao
PathGao deleted the perf/snap-packages-the-release-deb branch August 11, 2026 11:14
PathGao added a commit that referenced this pull request Aug 12, 2026
…660)

* docs: bring the release runbook and the syntax reference up to 2.7.4

Four claims in the docs describe behaviour that PRs since 2.7.3 changed, and
two features shipped without reaching the file that documents what Markpad
can do.

RELEASING.md
- snapcraft.yaml no longer builds the app; it unpacks the release's own .deb
  (#579), so the `npm ci` note and the `rust-deps` troubleshooting row both
  described a file that no longer exists in that shape (#577).
- The .deb/.rpm coverage note still said *Check for Updates…* offers an
  update and then fails to install it. #573 asks `self_update_supported`
  first, so it says where updates come from instead.
- Adds the AppImage checks (#584, #658) as their own troubleshooting row, and
  notes that release builds are serialized (#612).

README, README.zh-CN
- The same pre-#573 claim, in both languages. The Chinese one also told
  .deb/.rpm users to update "through their distribution channels", which is
  the sentence #566 removed from the English one — there is no apt or dnf
  repository.

snapcraft.yaml
- The comment pointed at .github/workflows/test_snap.yml, deleted in #601.

samples/markdown-syntax{,.zh-CN}.md
- Lists: Enter continues the marker, Tab changes level, Enter on an empty
  item leaves the list (#636), and the three list chords (#652).
- Tables: cell, row and column keys, why deleting a row has no chord (#645,
  #653).
- Links: Ctrl/Cmd+K (#652).

npm test 904 pass, vitest 365 pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(syntax): drop two design arguments that belong in the PRs, not here

The syntax reference carries no issue numbers, no history and no defence of
a decision anywhere in its 500 lines; where it does give a reason -- the
three deliberate incompatibilities -- the reason tells the reader what to
write instead. Two sentences I added argued for the design at the reader:
that four other editors use Mod+K, and why deleting a row has no chord while
deleting a column does. Neither changes anything the reader would type.

What is left of the second is the part that was actually useful: to delete a
row, delete its line.

* docs(readme): drop the only issue number a reader ever sees

#570 was the last issue number in either README, and it was one I added a
few days ago. It is a closed bug report, and after #573 the sentence it was
attached to describes ordinary behaviour -- so a reader asking "how does my
.deb update" now clicks through to a fault that no longer exists.

The half-sentence in front of it went for the same reason: "rather than
offering one it cannot install" describes what the app used to do. What is
left is what the reader needs -- .deb and .rpm are one-time installs, there
is no apt or dnf repository, and Check for Updates says so.

Both READMEs keep the Report a Bug link, which is the only issue link either
of them had before.

* docs(releasing): cut the post-mortems back out of the runbook

This file is what you read on the day you cut a release. Over three days in
August I turned it into a runbook with post-mortems threaded through it:
which run pushed Chocolatey 2.7.2 at 15:37, that the snap served 2.6.11 for
three months and six versions, which two of the three v2.7.2 attempts the
AppImage strip failed in, how the 2.7.2/2.7.3 lock skew was found. All true,
none of it changes what you do next, and it sits between you and step 5
while a build is running.

Test applied to each one: can it change an action taken on release day.

Gone: the "Why package managers publish after the release" section entirely
-- its one operational sentence (workflow_dispatch works against a published
tag, the only way to exercise snapcraft.yaml) moves into step 7, where you
would need it. The failure histories in three troubleshooting rows, keeping
the symptom and the fix. The placeholder-pubkey era. Two design defences.

Kept: reasons that stop you doing the wrong thing -- why not to create
anything at alecdotdev/Markpad, why the Cargo.lock bump is the one that gets
forgotten. A prohibition without its reason gets deleted as superstition by
whoever comes next.

1957 -> 1563 words. The version before I started was 883.

---------

Co-authored-by: PathGao <gaoyanbo@gaoyanbodeMacBook-Air.local>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant