Skip to content

bump x/clipboard to v0.8.0 for Wayland support, keep vendor patches - #52

Merged
cfoust merged 2 commits into
mainfrom
claude/pr-51-clipboard-patch-64qz8r
Sep 6, 2026
Merged

cfoust merged 2 commits into
mainfrom
claude/pr-51-clipboard-patch-64qz8r

Conversation

@cfoust

@cfoust cfoust commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Supersedes #51 by @wilsonsk0, which bumped golang.design/x/clipboard to v0.8.0 for native Wayland support. Their commit is carried as-is; this branch adds one follow-up commit on top.

What was wrong in #51

  • go mod tidy was incomplete, so CI's format/tidy diff check failed on stale go.sum entries.
  • The module was re-vendored verbatim from upstream, which dropped cy's local patch to x/clipboard (ReadErr, and Write returning an error). pkg/clipboard was then rewritten against the upstream API, which swallows write errors and loses read errors.

Changes

  • Tidy go.sum.
  • Re-apply the clipboard patch on top of v0.8.0 and restore pkg/clipboard/module.go to the error-propagating version. Upstream's PNG normalization in Write is kept.
  • go mod vendor also clobbers two other hand-patched vendored modules (go-vte colon sub-parameters for styled underlines, go-daemon lock-file error wrapping). All three patches now live in patches/ with a README, and a new just vendor recipe runs go mod tidy && go mod vendor && git apply patches/*.patch. The roundtrip reproduces the tree exactly. CLAUDE.md documents this.
  • Drop libx11-dev from the workflows: v0.8.0 speaks the X11 wire protocol in pure Go, so the dev package is no longer needed to build on Linux.
  • Changelog entry under Unreleased.

Verification

generate, format, tidy, lint, build, go test -race ./pkg/... ./cmd/..., and the docs build all pass locally.

Note for Wayland users: v0.8.0 uses the native backend only on compositors that expose a data-control manager (wlroots, KWin, GNOME 49+) and falls back to XWayland otherwise, so behavior on older GNOME is unchanged.

馃 Generated with Claude Code

https://claude.ai/code/session_01Q72W2BVbNZTQaiLsURxbe6


Generated by Claude Code

wilsonsk0 and others added 2 commits September 6, 2026 09:46
Follow-up to #51, which bumped x/clipboard to v0.8.0 for native
Wayland support. That PR's `go mod tidy` was incomplete and it also
re-vendored the module verbatim, dropping cy's local patch that makes
Write return an error and adds ReadErr. This restores that patch on
top of v0.8.0 and reverts pkg/clipboard to the error-propagating API.

`go mod vendor` also clobbers two other hand-patched modules (go-vte
colon sub-parameters, go-daemon error wrapping). All three patches now
live in patches/ and are re-applied by a new `just vendor` recipe so
future bumps don't silently lose them.

v0.8.0 speaks the X11 wire protocol directly, so libx11-dev is no
longer needed to build on Linux; drop it from the workflows.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q72W2BVbNZTQaiLsURxbe6
@cfoust
cfoust merged commit 3e2189d into main Sep 6, 2026
1 check passed
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.

3 participants