Skip to content

feat(config): flip .backend = .sdl to the extracted package by default (#386) - #447

Merged
apotema merged 1 commit into
mainfrom
feat/386-flip-sdl-default
Jun 30, 2026
Merged

feat(config): flip .backend = .sdl to the extracted package by default (#386)#447
apotema merged 1 commit into
mainfrom
feat/386-flip-sdl-default

Conversation

@apotema

@apotema apotema commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

builtinProvider(.sdl)labelle-sdl 0.1.0 — 4th default-external backend. Desktop-only, loop-style; inherits the cache fetch-path + splice from the prior flips. labelle-sdl published + CI-green. Test rework: enum-shorthand + the two sdl build_zig tests (local pkg + project_dir). zig build test green.

Summary by CodeRabbit

  • New Features

    • SDL projects now resolve as an external backend when no custom backend package is set.
    • Build generation now supports pointing SDL to a local in-repo backend package.
  • Bug Fixes

    • Corrected backend detection so SDL is treated consistently with other external backends.
    • Updated related checks to report SDL as external and use the expected backend package resolution.

#386)

builtinProvider(.sdl) → labelle-sdl 0.1.0 — sdl is the 4th default-external
backend (after bgfx/wgpu/null). Desktop-only, loop-style; inherits the cache
fetch-path + manifest splice from the prior flips.

Test rework (same class): backend_registry enum-shorthand (sdl joins external),
and the two build_zig sdl tests (wires-modules, input-core-override) point at a
local sdl pkg + project_dir so the manifest splice resolves in-tree.
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a1d8bd25-6c6a-40d7-9203-83edb6bbc8ce

📥 Commits

Reviewing files that changed from the base of the PR and between 2e93fb8 and f334bbd.

📒 Files selected for processing (3)
  • src/backend_registry.zig
  • src/config.zig
  • test/build_zig_tests.zig

📝 Walkthrough

Walkthrough

This PR changes how the .sdl built-in backend tag is resolved: ProjectConfig.builtinProvider() now maps .sdl to an external labelle-sdl package instead of treating it as bundled. Corresponding test expectations in backend_registry and build_zig_tests are updated to reflect external resolution.

Changes

SDL External Backend Resolution

Layer / File(s) Summary
Provider mapping for .sdl backend
src/config.zig, src/backend_registry.zig
builtinProvider() maps .sdl to external package labelle-sdl v0.1.0 instead of returning null; backend registry test now expects .sdl to be external with a non-null effective package.
Build generation tests for SDL package wiring
test/build_zig_tests.zig
Two SDL build-config tests now explicitly set backend_package to local:backends/sdl and project_dir = "." in generator options.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Little SDL hopped outside today,
No longer bundled, free to play,
A package fetched from far away,
"local:backends/sdl" shows the way,
Hooray, hooray, external SDL! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: making .backend = .sdl use the extracted package by default.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/386-flip-sdl-default

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request extracts the sdl backend into an external package instead of keeping it bundled. It updates the backend registry tests, configures the sdl repository details in ProjectConfig, and updates the build tests to reference the external sdl package. There are no review comments, so no feedback is provided.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@apotema
apotema merged commit b18b477 into main Jun 30, 2026
4 checks passed
@apotema
apotema deleted the feat/386-flip-sdl-default branch June 30, 2026 21:26
apotema added a commit that referenced this pull request Jun 30, 2026
…386) (#448)

sdl resolves out-of-tree now (`.backend = .sdl` → labelle-sdl, flipped in #447),
so the in-tree backends/sdl/ slot is dead weight. Delete it + the coverage that
built it in-tree:
- Remove backends/sdl/ (src/templates/manifest/fragments/build_helpers/example).
- CI: drop the "SDL backend build-helper tests" step. (backends/sdl_gamepad is a
  separate shared sub-package — still used by the bundled raylib/sokol — kept.)
- Tests: drop the 2 sdl build_zig unit tests (no in-tree package to resolve;
  coverage moved to labelle-sdl's CI) + the sdl in-tree-template preview case.

FOUR backends now fully out of the bundle: bgfx + wgpu + null + sdl. Remaining
bundled: raylib, sokol.
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