Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/flybot-site/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Bump `lasagna-remote` to 0.1.5
- Bump `lasagna-remote` to 0.1.6 — role-gate pre-walk, CLJS Wireable/Mutable detection, and transit encoding of `/api/_schema` (Malli schemas no longer leak through `normalize-value`)

## [0.4.0] - 2026-04-14

Expand Down
2 changes: 1 addition & 1 deletion examples/pull-playground/resources/version.edn
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{:version "0.4.4"}
{:version "0.4.5"}
8 changes: 8 additions & 0 deletions remote/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.6] - 2026-04-24

### Fixed

- `direct-satisfies?` regressions from 0.1.3, breaking `Wireable` / `Mutable` detection:
- CLJS: always returned false — a function wrapper hid the protocol symbol from CLJS's `satisfies?` macro. Fixed by making `direct-satisfies?` a macro.
- JVM: missed types extended via an interface (e.g. Malli schemas, reify over `malli.core.Schema`) — caused transit encoding to throw on `GET /api/_schema`. Fast path now falls through `supers` on direct-class miss.

## [0.1.5] - 2026-04-24

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion remote/resources/version.edn
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{:version "0.1.5"}
{:version "0.1.6"}
27 changes: 15 additions & 12 deletions remote/src/sg/flybot/pullable/remote/http.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,27 @@
#?(:clj [cognitect.transit :as transit])
#?(:clj [clojure.edn :as edn])
#?(:clj [clojure.java.io :as io]))
#?(:cljs (:require-macros [sg.flybot.pullable.remote.http :refer [direct-satisfies?]]))
#?(:clj (:import [java.io ByteArrayInputStream ByteArrayOutputStream])))

;;=============================================================================
;; Protocol Utilities
;;=============================================================================

(defn- direct-satisfies?
"Fast alternative to `clojure.core/satisfies?`. True when `v`'s class directly
implements the protocol interface (covers `deftype` inline and `reify`) OR is
registered in the protocol's `:impls` map (covers `extend-type` /
`extend-protocol`).

Does not cover `:extend-via-metadata` — values whose protocol impl is attached
via metadata aren't detected."
[protocol v]
#?(:clj (or (instance? (:on-interface protocol) v)
(some? (get (:impls protocol) (class v))))
:cljs (satisfies? protocol v)))
#?(:clj
(defmacro ^:private direct-satisfies?
"Fast path for `satisfies?`. Macro — CLJS's `satisfies?` needs the
protocol as a compile-time symbol, which a function wrapper would lose."
[protocol-sym v]
(if (:ns &env)
`(cljs.core/satisfies? ~protocol-sym ~v)
`(let [v# ~v
protocol# ~protocol-sym
impls# (:impls protocol#)
cls# (class v#)]
(or (instance? (:on-interface protocol#) v#)
(contains? impls# cls#)
(boolean (some impls# (supers cls#))))))))

;;=============================================================================
;; Security: Safe Pattern Evaluation
Expand Down
Loading