Skip to content

Commit 9b95ad5

Browse files
authored
Merge pull request #655 from codeGlaze/refactor/data-extraction
#2 Refactor/data extraction
2 parents 49bc109 + 4da1d84 commit 9b95ad5

File tree

11 files changed

+19484
-19237
lines changed

11 files changed

+19484
-19237
lines changed

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ Before scanning the codebase, read the architecture map and KB index:
2828
- **`def` vs `defn`** — several key helpers are `def`s (partials/data), not `defn`s. Won't appear in `defn` greps
2929
- **Shared helper deps dictate placement** — if a shared helper calls X, X must stay shared too, even if X looks domain-specific
3030
- **`.clj-kondo` is in `.gitignore`** — use `git add -f` to stage kondo config
31+
- **`::` keywords and data extraction**`_data.cljc` siblings use `:as-alias` to produce the parent namespace's qualified keywords without circular deps (see `magic_items_data.cljc`)

docs/TODO.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,69 @@ jpackage --input target --main-jar orcpub.jar --type exe \
7474
- Bundle Datomic alongside the app, start as a Windows service (`--win-service`)
7575
- Package as two installers (app + transactor)
7676
- Single installer with a launcher script that starts both
77+
78+
## Replace or fork lein-garden
79+
80+
**Status:** Open — future work
81+
**Severity:** Low (tech debt)
82+
**Reported:** 2026-02-25
83+
84+
### Problem
85+
86+
`lein-garden` 0.3.0 (last release: 2016) is abandoned. It pins `ns-tracker`
87+
0.3.0 (2014), which doesn't understand `:as-alias` (Clojure 1.11+) and treats
88+
it as a real dependency — causing false circular dep errors during AOT.
89+
90+
We work around this with a dependency override (`ns-tracker` 1.0.0 exclusion in
91+
`project.clj`), but the plugin itself is unmaintained and a liability.
92+
93+
### Options
94+
95+
1. **Maintenance fork** — fork `lein-garden` to `orcpub/lein-garden`, bump
96+
`ns-tracker` to 1.0.0, publish to Clojars. Minimal effort, self-hosted.
97+
2. **Replace with a script**`lein-garden` is a thin wrapper around
98+
`garden.core/css`. A 10-line Leiningen alias or shell script calling
99+
`garden.core/css` directly would do the same job with no plugin dependency.
100+
3. **Migrate to `lambdaisland/garden`** — the Garden CSS library itself is
101+
alive (`com.lambdaisland/garden 1.9.606`). Evaluate if the maintained
102+
version has its own build tooling.
103+
104+
### Related
105+
106+
- `project.clj``:plugins` section, ns-tracker exclusion/override
107+
- `ns-tracker` 1.0.0 fix: commit `6f508d5` (Sept 2021), released June 2024
108+
- `lein-garden` last release: 0.3.0, April 2016 — no maintained fork found
109+
110+
## Magic item builder: saving throw bonus dropdown is a dead control
111+
112+
**Status:** Open
113+
**Severity:** Low (cosmetic)
114+
**Reported:** 2026-02-25
115+
116+
### Problem
117+
118+
In the homebrew magic item builder, the "Saving Throw Bonus" section renders a
119+
dropdown per ability — but each dropdown is hardcoded to a single option
120+
(`"Increases By"`) with no `on-change` handler and no subscription for its value.
121+
122+
Compare with the sibling sections:
123+
124+
| Section | Options | Wired up? |
125+
|---------|---------|-----------|
126+
| Ability Bonus | "Becomes At Least", "Increases By" | Yes |
127+
| Speed Bonus | "Becomes At Least", "Increases By", "Equals Walking Speed" | Yes |
128+
| Saving Throw Bonus | "Increases By" (only) | **No** |
129+
130+
The number field next to the dropdown works correctly — only the dropdown itself
131+
is inert.
132+
133+
### Proposed fix
134+
135+
Wire it up — add "Becomes At Least" option with `on-change` dispatch and
136+
subscription, matching the ability bonus pattern. Even though no SRD item uses
137+
a saving throw floor, homebrew creators should have the same modifier knobs
138+
available for saves as they do for abilities and speed.
139+
140+
### Related
141+
142+
- `src/cljs/orcpub/dnd/e5/views/builders/item.cljs``item-saving-throw-bonuses` (~line 302)

project.clj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
[re-frame "1.4.4"]
4040
[reagent "2.0.1"]
4141
[com.lambdaisland/garden "1.9.606"]
42+
;; lein-garden 0.3.0 injects ns-tracker 0.2.2 (^:displace) into
43+
;; its subprocess classpath. That version doesn't understand
44+
;; :as-alias (Clojure 1.11+), causing false circular dep errors.
45+
;; This explicit dep displaces the old version everywhere garden runs.
46+
[ns-tracker "1.0.0"]
4247
[org.apache.pdfbox/pdfbox "3.0.6"]
4348
;; Pedestal 0.7.0 uses Jetty 11, which is compatible with figwheel-main's Ring adapter.
4449
;; Pedestal 0.7.1+ and 0.8.x use Jetty 12, causing NoClassDefFoundError: ScopedHandler
@@ -95,6 +100,9 @@
95100
;; spawns a subprocess via eval-in-project whose I/O pump hangs in no-TTY.
96101
;; See docs/LEIN-UBERJAR-HANG.md
97102
:plugins [[lein-localrepo "0.5.4"]
103+
;; lein-garden 0.3.0 (2016, abandoned) — see docs/TODO.md
104+
;; "Replace or fork lein-garden" for long-term plan.
105+
;; ns-tracker override is in :dependencies (see comment there).
98106
[lein-garden "0.3.0"]
99107
[lein-environ "1.2.0"]
100108
[dev.weavejester/lein-cljfmt "0.16.0"]

0 commit comments

Comments
 (0)