Skip to content

1.49.1: the enum headers upstream installs and this fork did not - #1

Merged
Sunrisepeak merged 1 commit into
mainfrom
feat/enum-headers
Aug 30, 2026
Merged

1.49.1: the enum headers upstream installs and this fork did not#1
Sunrisepeak merged 1 commit into
mainfrom
feat/enum-headers

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

wlroots 0.20 has #include <wayland-protocols/xdg-shell-enum.h> in ten of its public headers. Upstream wayland-protocols installs those (include/wayland-protocols/meson.build runs wayland-scanner enum-header over every XML); genproto.sh here generated only client-header, server-header and public-code. A consumer of wlroots writing the ordinary #include <wlr/...> had nothing to resolve them against.

The enum header carries only the protocol's enums — no interface symbols, no libwayland dependency. That's why upstream installs it separately: a header that merely wants to name enum xdg_toplevel_state gets it without pulling in a marshalling table it would then have to link.

⭐ Why checked in rather than generated by build.mcpp

§14 of the graphics-stack design doc says generation belongs in build.mcpp, not in checked-in artifacts. It cannot apply here, and the reason is measured (2026-08-31, two-package probe):

consumer sees it?
mcpp::include_dir() from a build program ❌ package-private — fatal error: prov_gen.h: No such file or directory
[build] include_dirs in the manifest ✅ propagates

A package whose product IS headers cannot produce them at build time. That's a real limit of the mechanism, not a legacy shortcut in this fork — written into each member's manifest so the next person doesn't have to rediscover it.

Version

1.49.1 — third component is this fork's revision; upstream ships two-component versions and 1.49 is the newest. Not a re-cut of 1.49: the store is keyed by (name, version) and would not re-extract it, while the tag archive's sha256 changes under every published descriptor. Additive content, additive version.

Scope

65 protocols × 1 new header. No existing generated file changes — the regenerate-and-diff CI step passes unmodified, and upstream/ is untouched.

Verified locally: workspace builds, and #include <wayland-protocols/xdg-shell-enum.h> compiles in a C++23 TU (XDG_TOPLEVEL_STATE_MAXIMIZED=1).

wlroots 0.20 has `#include <wayland-protocols/xdg-shell-enum.h>` in ten of its
PUBLIC headers. Upstream wayland-protocols installs those — include/wayland-
protocols/meson.build runs `wayland-scanner enum-header` over every XML — and
genproto.sh here generated only client-header, server-header and public-code.
So a consumer of wlroots writing the ordinary `#include <wlr/...>` had nothing
to resolve them against.

The enum header carries only the protocol's enums: no interface symbols, no
libwayland dependency. That is why it is installed separately — a header that
wants to name `enum xdg_toplevel_state` gets it without pulling in a
marshalling table it would then have to link.

⭐ WHY CHECKED IN RATHER THAN GENERATED BY build.mcpp

§14 of the graphics-stack design doc says generation belongs in build.mcpp, not
in checked-in artifacts. It cannot apply here, and the reason is measured
(2026-08-31, two-package probe):

  mcpp::include_dir() from a build program   →  PACKAGE-PRIVATE, consumer
                                                gets 'No such file or directory'
  [build] include_dirs in the manifest       →  propagates to consumers

A package whose PRODUCT is headers therefore cannot produce them at build
time. That is a real limit of the mechanism, not a legacy shortcut in this
fork, and it is written into each member's manifest so the next person does
not spend the afternoon I would have.

VERSION: 1.49.1, third component = this fork's revision (upstream ships
two-component versions; 1.49 is newest). Not a re-cut of 1.49, because the
store is keyed by (name, version) and would not re-extract it — additive
content, additive version.

65 protocols × 1 new header. No existing generated file changes; the CI's
regenerate-and-diff step passes unmodified.
@Sunrisepeak
Sunrisepeak merged commit cf77e09 into main Aug 30, 2026
4 checks passed
@Sunrisepeak
Sunrisepeak deleted the feat/enum-headers branch August 30, 2026 20:42
Sunrisepeak added a commit to mcpplibs/mcpp-index that referenced this pull request Aug 30, 2026
…317)

wlroots 0.20 includes `<wayland-protocols/xdg-shell-enum.h>` from TEN of its
public headers. Upstream wayland-protocols installs those (include/wayland-
protocols/meson.build runs `wayland-scanner enum-header` over every XML); the
fork generated only client-header, server-header and public-code. So a
consumer of wlroots writing the ordinary `#include <wlr/...>` had nothing to
resolve them against.

Purely additive: 65 protocols x 1 new header, no existing generated file
changes, upstream/ untouched. mcpplibs/wayland-protocols#1, all four CI jobs
green.

⭐ WHY THEY ARE CHECKED IN RATHER THAN GENERATED BY build.mcpp

§14 of the graphics-stack design doc prescribes build-time generation. It
cannot apply to a package whose PRODUCT is headers, and the reason is
measured (2026-08-31, two-package probe):

  mcpp::include_dir() from a build program  ->  PACKAGE-PRIVATE; the consumer
                                                gets 'No such file or directory'
  [build] include_dirs in the manifest      ->  propagates to consumers

VERSION: the third component is the FORK's revision. Upstream ships
two-component versions and 1.49 is the newest. Not a re-cut of 1.49 — the
store is keyed by (name, version) and would not re-extract it, while the tag
archive's sha256 changes under every published descriptor. 1.49 stays exactly
as published; nothing that depends on it moves.
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