Releases: taoensso/truss
v2.2.1 (2025-11-15)
- Dependency: on Clojars
- Versioning: Break Versioning
This is a hotfix release to address an issue with the with-ctx+ util. It should be a safe upgrade for users of v2.2.0.
v2.2.0 (2025-08-21)
- Dependency: on Clojars
- Versioning: Break Versioning
This is a feature release focused on quality-of-life improvements. It should be a non-breaking upgrade for the vast majority of typical users, but please note the changes below to be sure.
Since v2.1.0 (2025-04-29)
- ➤ [mod] Make macros:
ex-info,ex-info!,unexpected-arg![14e3e86] - [new]
with-ctx/+: allow multi-form bodies [d9228d8] - [doc] Misc doc improvements, added intro video
v2.1.0 (2025-04-29)
- Dependency: on Clojars
- Versioning: Break Versioning
This is a major rewrite of Truss that expands the library's scope, and modernises its implementation. There are breaking changes to the ex-data produced by the 4x assertion macros (have, have?, have!, have!?) in Truss and Encore.
This should be a non-breaking update for folks not using assertion ex-data, but please ping me if you run into any unexpected trouble. Apologies for the inconvenience! - Peter Taoussanis 🙏
CHANGES since v1.x
Deprecated assertion API
set-error-fn!andwith-error-fnhave been deprecated. Please use*failed-assertion-handler*instead (see linked docstring for details).get-dataandwith-datahave been deprecated. Please use*ctx*instead.
Changes to assertion ex-data
By default, Truss throws an ex-info exception on assertion failures. The included ex-data has changed!
Old ex-data (Truss v1):
:pred ------ (Unchanged) Predicate form
:arg ------- (Unchanged) {:keys [form value type]}
:dt -------- `js/Error` or `java.util.Date`
:loc ------- {:keys [ns line column]}
:data ------ {:keys [arg dynamic]}
:env ------- {:keys [elidable? *assert*]}
:msg ------- String
:err ------- Error thrown during pred check
New ex-data (Truss v2):
:pred ------ (Unchanged) Predicate form
:arg ------- (Unchanged) {:keys [form value type]}
:inst ------ `js/Error` or `java.time.Instant` (note type change!)
:ns -------- Namespace string
:coords ---- ?[line column]
:data ------ Optional `:data` value (replaces :data/arg)
:truss/ctx - `truss/*ctx*` value (replaces :data/dynamic)
:msg ------- REMOVED (use `ex-message` instead)
:error ----- REMOVED (use `ex-cause` instead)
- You can customise ex-data by modifying
*failed-assertion-handler*. - You can keep the old ex-data by setting the
taoensso.truss.legacy-assertion-ex-dataJVM property totrue.
New since v1.x
-
Significant performance and expansion size improvements to the assertions API (
have,have?,have!,have!?). Esp. useful for ClojureScript codebases that use many assertions. -
Added new contextual exceptions API:
ex-info,ex-info!,*ctx*,set-ctx!,with-ctx,with-ctx+. -
Added new Error utils imported (moved) from Encore:
error?,try*,catching,matching-error,throws,throws?,catching-rf,catching-xform,unexpected-arg!.
Since v2.0.0
v2.0.6 (2025-04-29)
- Dependency: on Clojars
- Versioning: Break Versioning
This is a major rewrite of Truss that expands the library's scope, and modernises its implementation. There are breaking changes to the ex-data produced by the 4x assertion macros (have, have?, have!, have!?) in Truss and Encore.
This is a non-breaking update for folks not using assertion ex-data.
Apologies for any inconvenience! - Peter Taoussanis 🙏
CHANGES since v1.x
Deprecated assertion API
set-error-fn!andwith-error-fnhave been deprecated. Please use*failed-assertion-handler*instead.get-dataandwith-datahave been deprecated. Please use*ctx*instead.
Changes to assertion ex-data
The ex-data included in assertion failures has changed!
Old ex-data:
:pred ------ (Unchanged) Predicate form
:arg ------- (Unchanged) {:keys [form value type]}
:dt -------- `js/Error` or `java.util.Date`
:loc ------- {:keys [ns line column]}
:data ------ {:keys [arg dynamic]}
:env ------- {:keys [elidable? *assert*]}
:msg ------- String
:err ------- Error thrown during pred check
New ex-data:
:pred ------ (Unchanged) Predicate form
:arg ------- (Unchanged) {:keys [form value type]}
:inst ------ `js/Error` or `java.time.Instant`
:ns -------- Namespace string
:coords ---- [line column]
:data ------ Optional `:data` value (replaces :data/arg)
:truss/ctx - `truss/*ctx*` value (replaces :data/dynamic)
:msg ------- REMOVED (use `ex-message` instead)
:error ----- REMOVED (use `ex-cause` instead)
- You can customise ex-data by modifying
*failed-assertion-handler*. - You can keep the old ex-data by setting the
taoensso.truss.legacy-assertion-ex-dataJVM property totrue.
New since v1.x
-
Significant performance and expansion size improvements to the assertions API (
have,have?,have!,have!?). Esp. useful for ClojureScript codebases that use many assertions. -
Added new contextual exceptions API:
ex-info,ex-info!,*ctx*,set-ctx!,with-ctx,with-ctx+. -
Added new Error utils imported (moved) from Encore:
error?,try*,catching,matching-error,throws,throws?,catching-rf,catching-xform,unexpected-arg!.
Since v2.0.0
- Fix broken Clj
set-error-fn!(v2.0.6)
v2.0.5 (2025-03-03)
- Dependency: on Clojars
- Versioning: Break Versioning
This is a major rewrite of Truss that expands the library's scope, and modernises its implementation. There are breaking changes to the ex-data produced by the 4x assertion macros (have, have?, have!, have!?) in Truss and Encore.
This is a non-breaking update for folks not using assertion ex-data.
Apologies for any inconvenience! - Peter Taoussanis 🙏
CHANGES since v1.x
Deprecated assertion API
set-error-fn!andwith-error-fnhave been deprecated. Please use*failed-assertion-handler*instead.get-dataandwith-datahave been deprecated. Please use*ctx*instead.
Changes to assertion ex-data
The ex-data included in assertion failures has changed!
Old ex-data:
:pred ------ (Unchanged) Predicate form
:arg ------- (Unchanged) {:keys [form value type]}
:dt -------- `js/Error` or `java.util.Date`
:loc ------- {:keys [ns line column]}
:data ------ {:keys [arg dynamic]}
:env ------- {:keys [elidable? *assert*]}
:msg ------- String
:err ------- Error thrown during pred check
New ex-data:
:pred ------ (Unchanged) Predicate form
:arg ------- (Unchanged) {:keys [form value type]}
:inst ------ `js/Error` or `java.time.Instant`
:ns -------- Namespace string
:coords ---- [line column]
:data ------ Optional `:data` value (replaces :data/arg)
:truss/ctx - `truss/*ctx*` value (replaces :data/dynamic)
:msg ------- REMOVED (use `ex-message` instead)
:error ----- REMOVED (use `ex-cause` instead)
- You can customise ex-data by modifying
*failed-assertion-handler*. - You can keep the old ex-data by setting the
taoensso.truss.legacy-assertion-ex-dataJVM property totrue.
v2.0.0 (2025-02-27)
- 📦 Dependency: on Clojars
- Versioning: Break Versioning
This is a major rewrite of Truss that expands the library's scope, and modernises its implementation. There are breaking changes to the ex-data produced by the 4x assertion macros (have, have?, have!, have!?) in Truss and Encore.
This is a non-breaking update for folks not using assertion ex-data.
Apologies for any inconvenience! - Peter Taoussanis 🙏
CHANGES since v1.x
Deprecated assertion API
set-error-fn!andwith-error-fnhave been deprecated. Please use*failed-assertion-handler*instead.get-dataandwith-datahave been deprecated. Please use*ctx*instead.
Changes to assertion ex-data
The ex-data included in assertion failures has changed!
Old ex-data:
:pred ------ (Unchanged) Predicate form
:arg ------- (Unchanged) {:keys [form value type]}
:dt -------- `js/Error` or `java.util.Date`
:loc ------- {:keys [ns line column]}
:data ------ {:keys [arg dynamic]}
:env ------- {:keys [elidable? *assert*]}
:msg ------- String
:err ------- Error thrown during pred check
New ex-data:
:pred ------ (Unchanged) Predicate form
:arg ------- (Unchanged) {:keys [form value type]}
:inst ------ `js/Error` or `java.time.Instant`
:ns -------- Namespace string
:coords ---- [line column]
:data ------ Optional `:data` value (replaces :data/arg)
:truss/ctx - `truss/*ctx*` value (replaces :data/dynamic)
:msg ------- REMOVED (use `ex-message` instead)
:error ----- REMOVED (use `ex-cause` instead)
- You can customise ex-data by modifying
*failed-assertion-handler*. - You can keep the old ex-data by setting the
taoensso.truss.legacy-assertion-ex-dataJVM property totrue.
New since v1.x
-
Significant performance and expansion size improvements to the assertions API (
have,have?,have!,have!?). Esp. useful for ClojureScript codebases that use many assertions. -
Added new contextual exceptions API:
ex-info,ex-info!,*ctx*,set-ctx!,with-ctx,with-ctx+. -
Added new Error utils imported (moved) from Encore:
error?,try*,catching,matching-error,throws,throws?,catching-rf,catching-xform,unexpected-arg!.
v1.12.0 (2024-09-07)
📦 Available on Clojars, uses Break Versioning.
This is a non-breaking minor maintenance release that improves some docstrings and updates some internal code. Thank you!
1.11.0 (2023-07-31)
1.10.1 (2023-07-15)
This is a hotfix release, please upgrade if you're using 1.10.0.
Fixes since 1.10.0
- 46b2f69 [fix] Prevent
get-sourcefrom throwing for JAR resources
1.10.0 (2023-07-07)
This is a minor feature release, and should be a non-breaking upgrade.