taoensso / truss

Assertions micro-library for Clojure/Script
https://www.taoensso.com/truss
Eclipse Public License 1.0
302 stars 14 forks source link

truss and its dependents won't load in Planck #10

Open atroche opened 6 years ago

atroche commented 6 years ago

You're probably already aware, but just in case:

~/c/planck-scatch> plk -D "com.taoensso/truss:1.5.0"
ClojureScript 1.10.238
cljs.user=> (require 'taoensso.truss)
WARNING: Use of undeclared Var taoensso.truss.impl$macros/Throwable at line 23 taoensso/truss/impl.clj
Could not eval taoensso.truss.impl in file taoensso/truss/impl.clj
Assert failed: Argument to resolve must be a quoted symbol
(core/and (seq? quoted-sym) (= (quote quote) (first quoted-sym))) at line 80 taoensso/truss/impl.clj

Mike Fikes has a good explanation here: https://github.com/planck-repl/planck/issues/734

ptaoussanis commented 1 year ago

@atroche Hi Alistair, thanks for the heads-up - and apologies for the long delay replying.

I'm not familiar with Planck. Could you explain your use case a bit? You want to use Truss's assertion macros in Planck code?

I'll need to wrap my head around how macros would work for something like Planck.

ptaoussanis commented 1 year ago

Quick update: from a quick skim of Planck's docs, it does appear to me that adding support for Planck might unfortunately be non-trivial.

A couple potential issues:

There seems there may be a fair amount of complexity here to sort out, I'd need to spend a fair chunk of time understanding the details to really judge the viability here.

The ideal would be if there were some guidelines for library authors with some examples to show how to satisfy Planck's requirements without negatively impacting other builds/tooling. I suspect that's probably possible with the right approach, it's just unclear to me how much such an approach would impact my usual patterns / workflow.

Planck looks really cool, would be great to support it if possible. But realistically, would need either some clear guidance on the above - or a strong motivation (e.g. wide user demand) to try dig further and experiment.

If you or others are strongly interested in this, please share any details you can re: intended use cases!

Cheers :-)