Skip to content

[feat/babashka] Add Babashka support with cross-platform core.cljc#7

Merged
charlesg3 merged 2 commits intomasterfrom
feat/babashka-support
Mar 28, 2026
Merged

[feat/babashka] Add Babashka support with cross-platform core.cljc#7
charlesg3 merged 2 commits intomasterfrom
feat/babashka-support

Conversation

@charlesg3
Copy link
Copy Markdown
Contributor

@charlesg3 charlesg3 commented Mar 28, 2026

Summary

  • Unify core.clj and core.cljs into core.cljc with reader conditionals for JVM/BB/CLJS differences
  • Extract file discovery into per-platform implementations (files.clj, files.bb, files.cljs) behind a shared config-file-maps interface
  • coercing-merge is now fully cross-platform with small parsing helpers (numeric?, parse-number, parse-bool)
  • Add cross-platform Babashka install to scripts/install; fix AWS CLI arch detection on Linux

Test plan

  • JVM tests pass (14 tests, 30 assertions)
  • Babashka: get-config, env var override, type coercion, get-config-table-str all verified
  • CLJS tests pass (shadow-cljs compile test)

…o ci]

Unify `core.clj` and `core.cljs` into a single `core.cljc` with reader
conditionals for platform differences. Extract file discovery into
per-platform implementations (`files.clj`, `files.bb`, `files.cljs`)
behind a shared `config-file-maps` interface.

## Changes

- *src/tech/config/core.cljc* — new unified implementation replacing
  `core.clj` and `core.cljs`; `coercing-merge` is now fully
  cross-platform with `numeric?`, `parse-number`, `parse-bool` helpers
- *src/tech/config/files.clj* — JVM file discovery via
  `clojure.java.classpath` with classpath dir + jar scanning
- *src/tech/config/files.bb* — Babashka file discovery via
  `System/getProperty "java.class.path"` (classpath dirs only)
- *src/tech/config/files.cljs* — Node.js file discovery via `fs`
  module (reads from `CONFIG_DIR` or `resources/`)
- *src/tech/config/core.clj* — deleted (replaced by `core.cljc`)
- *src/tech/config/core.cljs* — deleted (replaced by `core.cljc`)
- *test/tech/config/config_test.clj* — update exception types from
  `IllegalArgumentException` to `Exception`; replace `read-string?`
  test with `default-value` test
- *scripts/install* — add cross-platform Babashka install section;
  fix AWS CLI Linux install to use detected arch instead of hardcoded
  `x86_64`
@charlesg3 charlesg3 merged commit 53a74b5 into master Mar 28, 2026
1 of 2 checks passed
@charlesg3 charlesg3 deleted the feat/babashka-support branch March 28, 2026 23:04
@harold
Copy link
Copy Markdown
Contributor

harold commented Mar 28, 2026

He's going in 🥂

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.

2 participants