This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-09
Channels
- # aleph (3)
- # beginners (327)
- # calva (3)
- # cider (20)
- # cljdoc (59)
- # cljs-dev (40)
- # clojure (104)
- # clojure-dev (30)
- # clojure-italy (8)
- # clojure-nl (36)
- # clojure-russia (3)
- # clojure-spec (3)
- # clojure-uk (79)
- # clojurescript (54)
- # community-development (5)
- # cursive (28)
- # data-science (21)
- # datomic (35)
- # emacs (14)
- # expound (1)
- # figwheel (2)
- # figwheel-main (82)
- # fulcro (18)
- # graphql (13)
- # jobs (12)
- # jobs-discuss (38)
- # kaocha (8)
- # lambdaisland (1)
- # lumo (12)
- # off-topic (20)
- # onyx (4)
- # re-frame (51)
- # reagent (12)
- # reitit (8)
- # ring-swagger (1)
- # shadow-cljs (22)
- # slack-help (2)
- # spacemacs (6)
- # specter (16)
- # testing (3)
it seems cljdoc has trouble analyzing a namespace: https://circleci.com/gh/martinklepsch/cljdoc-builder/6831
I tried to fix the code, but now it complains about #'clojure.spec.test.alpha/explain-check
Thanks for the heads up — seems the error only occurs with ClojureScript analysis and Clojure actually works just fine.
I ran into a similar issue recently with Orchestra: https://clojurians.slack.com/archives/C03S1L9DN/p1541700069529900
@U04V15CAJ it used 1.10.339, there's no version of clojurescript specified in the projects dependencies
if you add 439 as a "provided" dependency it will get picked up by cljdoc
I now added it to the dev profile in project.clj. It was already a :extra-dep in deps.edn. Not sure what cljdoc uses
cljdoc uses the .pom that's uploaded to the Maven repository
and if you want to test this locally without pushing new artifacts you can do this: https://github.com/cljdoc/cljdoc/blob/master/doc/running-cljdoc-locally.md#importing-a-project-from-local-sources
[org.clojure/clojurescript "1.10.439" :scope "provided"]
add this to your :dependencies
in project.clj
if you want that version to be used
dependencies with scope "provided" will be ignored during dependency resolution (roughly speaking)
yeah I know how it works. I didn’t do that yet, because our lib strictly speaking doesn’t require you to provide a version of cljs. it can be used only with clj
it has to work only with clj. making it provided will introduce issues I think, because we won’t be able to test without this dep
I think having CLJS as a "provided" dependency shouldn't cause any issues in this regard but not a maven expert 😄
@U04V15CAJ if you want I can also give it a try myself
I’m not an expert either, but hey:
provided
This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime.
test
This scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases. This scope is not transitive.
I think it communicates something, even if the technical effect is the same.interesting question though, should clojurescript be provided or test for a .cljc file that can be used with or without cljs
Actually test
would be fine as well
(from a cljdoc POV)
but that said things still break with 439
Unable to resolve var: \instrument-enabled\ in this context at line 93 speculative/test.cljc
I don't see how 😄
the macro clojure.spec.test.alpha/with-instrument-disabled
uses that var. don’t know how the analyzer works, but it seems that it does a macroexpansion
and then expects the variable used from that macro to be present inside the namespace where the macro is called.
https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/spec/test/alpha.cljc#L46
as I mentioned there's been a similar issue with Orchestra, I haven't had time to get to the ground of this but something with spec seems to be breaking the analyzer https://circleci.com/gh/martinklepsch/cljdoc-builder/6786
(might be that the orchestra issue is also/just a versioning problem)
but orchestra also uses 439 it seems
is it possible to make a small repro for whatever analyzer is running this? (clojure.spec.test.alpha/with-instrument-disabled (+ 1 2 3))
should be able to trigger this
I'll take a stab at creating the repro
the analyzer code is a fork of codox: https://github.com/martinklepsch/codox/tree/cljs-proper
@U04V15CAJ reproduced it with your minimal snippet
Doesn't happen with 339
let me put some instructions in a branch
I think so but still testing