Skip to content

Rename the library to net.b12n.raylib-clj.* and move the examples to raylib-clj-demo - #11

Merged
burinc merged 3 commits into
mainfrom
net-b12n-raylib-clj-and-examples-moved
Oct 5, 2026
Merged

burinc merged 3 commits into
mainfrom
net-b12n-raylib-clj-and-examples-moved

Conversation

@burinc

@burinc burinc commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

What this changes

Two breaking changes in one PR, made together so raylib-clj ends up as a library with consistent namespaces.

1. The library is net.b12n.raylib-clj.* (a61974e). This matches the rest of the b12n raylib work; raylib-ios is net.b12n.raylib-ios.*.

  • raylib.* (29 namespaces) moved from src/raylib/ to src/net/b12n/raylib_clj/. raylib.core is now net.b12n.raylib-clj.core, and raylib.core.window is net.b12n.raylib-clj.core.window.
  • debug-stats is net.b12n.raylib-clj.debug-stats. The 80 bare [debug-stats] requires became [net.b12n.raylib-clj.debug-stats :as debug-stats], so every call site is unchanged.
  • It was a scripted rewrite by exact namespace with word boundaries: 1,209 references across 154 files. raylib.h and raylib.dll are untouched, and so is CHANGELOG history.
  • On this commit, bb check matched main exactly: all 143 namespaces compiled, with the same 69 lint warnings. asteroids and background-scrolling ran in a real window.

2. The 113 examples moved to raylib-clj-demo (7c988c7). Each is its own project there, with the namespace net.b12n.raylib-clj.scenes.<name>.

  • Removed here: src/examples/, resources/ (only the examples used it; each demo now carries the files it uses plus resources/LICENSE.md), docs/demos/, the gallery and catalog pages, the recorder manifest, the example tasks and aliases, the new-example issue template and sh/package-macos.sh.
  • Kept: the library, its tooling, the guide and libs/.
  • Retargeted: README, CONTRIBUTING, NOTICE (every third-party notice kept), CHANGELOG, the guide pages and the templates now point at raylib-clj-demo. bb/helpers.bb is down to its output helpers.

3. Two small fixes from review (2bc0e63): a raylib/lights.clj docstring path the rewrite missed, and a stale storage.data ignore entry.

Verified

  • bb check: all 30 namespaces compile, with lint at 0 errors and 1 warning (the existing nrepl.clj unused binding).
  • bb tasks lists 25 tasks, and no example task is left.
  • raylib-clj-demo pins this branch by :git/sha. There, bb check compiles all 113 scenes, bb doctor passes, and all 15 asset-loading demos load their files when run from their own directories.

Before merging

raylib-clj-demo is only a local repo so far, so https://github.com/b12n-oss/raylib-clj-demo doesn't exist yet. Everything this PR points readers at would 404 until it's published, so it's best to merge once that repo is up.

burinc added 3 commits October 5, 2026 07:41
A breaking change, made once so the namespaces match the rest of the b12n
raylib work (raylib-ios is net.b12n.raylib-ios.*):

- raylib.* (29 namespaces) is now net.b12n.raylib-clj.*, moved from
  src/raylib/ to src/net/b12n/raylib_clj/. raylib.core is
  net.b12n.raylib-clj.core, raylib.core.window is
  net.b12n.raylib-clj.core.window, and so on.
- debug-stats, the F1 overlay, is now net.b12n.raylib-clj.debug-stats. The
  80 bare [debug-stats] requires became
  [net.b12n.raylib-clj.debug-stats :as debug-stats], so every call site is
  unchanged.

The rewrite matched each namespace by exact name with word boundaries, so
raylib.h and raylib.dll are untouched, and left CHANGELOG history alone:
1,209 references across 154 files. The examples still run from here
in this commit, their requires updated.

bb check is identical before and after: all 143 namespaces compile, with the
same 69 lint warnings. clojure-lsp clean-ns --dry reports the same findings
it does on main. asteroids and background-scrolling open a window and run
for 25s, the latter loading its resources/ images.
The 113 example programs now live in
https://github.com/b12n-oss/raylib-clj-demo, one project per example, with
namespaces renamed net.b12n.raylib-clj.scenes.<name>, their own GIFs and the
resources/ files they use. This repo is the library only.

Removed: src/examples/, resources/ (with resources/LICENSE.md), docs/demos/,
docs/guide/demos.md, docs/guide/example-catalog.md, scripts/demo_manifest.edn,
the new_example issue template, sh/package-macos.sh, the 113 example aliases
in deps.edn, the 113 per-example bb tasks, the example-only bb tasks (run,
examples, record, record:status, record:new, demos:examples) and the example
registry and its helpers in bb/helpers.bb.

Stays: the bindings under src/net/b12n/raylib_clj/, libs/, the :check and
:dev aliases, and every other bb task (repl, nrepl, lint, whitespace, check,
check:full, lsp:*, hooks:*, clean, deps, outdated, loc, tree, macos:sign-lib,
info, help). deps.edn drops "resources" from :paths and project.clj drops
:resource-paths, :main, :aot and the asteroids init-ns. bb check:full now
compile-checks with clojure -M:check instead of requiring examples.asteroids.

Retargeted: README, CONTRIBUTING, the PR and bug templates, CI comments,
docs/site.edn (no :asset-dirs, the gallery moved) and the guide pages now
point at raylib-clj-demo wherever they pointed at an example here.
example-architecture-patterns.md stays and cites the demo repo. NOTICE keeps
every third-party notice and says the examples and resources/ moved, so its
resources/ section now applies to raylib-clj-demo. CHANGELOG gets a
2026-10-05 entry covering the rename and the move. LICENSE is untouched.

Measured gates: bb tasks parses and lists no example tasks (27 lines). bb
check: all 30 namespaces compile, lint errors 0, warnings 1. Before this
commit it was 143 namespaces and 69 warnings, counting the examples.
easings.clj still cited raylib/lights.clj, a path form the namespace rewrite
did not match. The storage.data ignore was for the storage-values example,
which moved to raylib-clj-demo.
@burinc
burinc merged commit 1b5f69b into main Oct 5, 2026
3 checks passed
@burinc
burinc deleted the net-b12n-raylib-clj-and-examples-moved branch October 5, 2026 16:01
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