Comments (10)
Thanks for reporting this bug!
In order to help me track down the problem, can you please let me know:
- Your version of Clojure
- Your version of Clojurescript
- Your version of
org.clojure/spec.alpha
(if any) - The 'require' statement for expound.
Thanks!
from expound.
I run the project with 'rlwrap lein figwheel'
lein -v
Leiningen 2.7.1 on Java 1.8.0_45 Java HotSpot(TM) 64-Bit Server VM
Dependencies in project.clj
:dependencies [ [org.clojure/clojure "1.9.0-alpha12"]
[org.clojure/clojurescript "1.9.671"]
[expound "0.1.0"]]
:plugins [[lein-figwheel "0.5.8"]]
In the repl I do
(require '[cljs.spec.alpha :as s])
instead of
(require '[clojure.spec.alpha :as s])
So when I use spec it goes well:
hello.core=> (s/explain :example/place {})
val: {} fails spec: :example/place predicate: (contains? % :city)
val: {} fails spec: :example/place predicate: (contains? % :state)
:cljs.spec.alpha/spec :example/place
:cljs.spec.alpha/value {}
But expound
hello.core=> (expound/expound :example/place {})
#object[TypeError TypeError: Cannot read property 'cljs$lang$applyTo' of undefined]
TypeError: Cannot read property 'cljs$lang$applyTo' of undefined
at Function.cljs.core.apply.cljs$core$IFn$_invoke$arity$3 (file:///Users/paulo/clojure/spec-cljs/out/cljs/core.js:12870:5)
at cljs$core$apply (file:/
from expound.
Thanks for the details! I am having trouble getting lein-figwheel 0.5.8 to work, but I can reproduce with that version of Clojure, Clojurescript and figwheel 0.5.11. I'm not sure what's going on - there seems to be some change in recent versions of Clojurescript where goog.string
is not being loaded properly. I don't see the same problem on Clojurescript 1.9.542, but I realize that's not a great workaround. I'll see if I can figure out the issue tomorrow.
from expound.
I think I may have discovered a fix. Can you try the following:
- Clone this repo
- cd into the main dir
- lein install
- In your test project's
project.clj
, change[expound "0.1.0"]]
to[expound "0.1.1-SNAPSHOT"]]
- Let me know if it is fixed :)
from expound.
error:
Could not find artifact expound:expound:jar:0.1.1-SNAPSHOT in clojars
from expound.
@pbrito That's correct: I haven't yet pushed it to Clojars. However, the lein install
step should install it for you locally (once you have pulled down this repo). Did you get any errors when running lein install
?
from expound.
Sorry! I didn't follow your instruction.
So, after following your instructions, I was able compiled without errors:
Wrote /Users/paulo/clojure/specT/expound/pom.xml
Installed jar and pom into local repo.
And using expound "0.1.1-SNAPSHOT" in my project returned:
dev:hello.core=> (expound/expound :example/place {})
-- Spec failed --------------------
{}
should contain keys: `:city`,`:state`
-- Relevant specs -------
:example/place:
(cljs.spec.alpha/keys
:req-un
[:example.place/city :example.place/state])
-------------------------
Detected 1 error
My project dependencies
:dependencies [ [org.clojure/clojure "1.9.0-alpha12"]
[org.clojure/clojurescript "1.9.542"]
[expound "0.1.1-SNAPSHOT"]
;[org.clojure/test.check "0.10.0-alpha2"]]
:plugins [[lein-figwheel "0.5.11"]]
from expound.
@pbrito Thanks very much for confirming the fix! I'll release a new version with this fix sometime tonight.
from expound.
Fixed with 131d86c
from expound.
@pbrito Should be fixed in version [expound "0.1.1"]
(now on Clojars). Thanks for the bug report!
from expound.
Related Issues (20)
- Error reports returned as :cause string in an exception when produced by instrumentation within generative testing HOT 11
- allow passing options map to expound/expound-str HOT 1
- Improve grouping of spec errors HOT 2
- Unnecessary dependency on `cider-nrepl` HOT 1
- Regression of #3 HOT 4
- Easier editing of error messages
- `printer` has invalid spec HOT 2
- "Cannot convert path" on instrumentation failures in the wild HOT 4
- (cljs.spec.test.alpha/instrument) breaks expound due to wrong arity HOT 4
- should expound work anywhere s/explain works? - clojurescript error HOT 7
- Error in :ret check when using with Orchestra 2020.07.12-1 HOT 5
- Internal error in `lift-singleton-groups` when having a datomic db value in fn args HOT 13
- Crash bug when printing, if a datomic db is present and the spec fails HOT 19
- Feature inquiry: a convenience function for validating a value against a spec HOT 4
- Wrapped `s/keys` does not properly display unqualified keyword specs HOT 5
- ClassCastException from `expound-str` when running in AWS Lambda HOT 9
- Small *print-length* and/or *print-level* sometimes yield NPE HOT 5
- PersistentList cannot be cast to class Named HOT 3
- proposal : defmsg equivalent for arbitrary predicates HOT 15
- optional include location of the spec error in the message. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expound.