@mfikes was there a specific reason the REPL doesn't print the version if it's synthetic?
No real compelling reason. It could print the number if useful.
It looks like 0.0.xyz
which might be helpful
fixed in master
tools like Cursive uses this to detect the REPL type
so might as always emit - I was actually scratching my head for long time wondering why sometimes Cursive would detect other times not
the difference was ClojureScript git dep or not
@dnolen Hi, I'm back about the cljs.analyzer.api/analyze-file
failure on a file of the specter package.
After a while, I'm able to propose you a synthetic example of the issue in the demo repo:
https://github.com/frozar/cljdoc_specter_support
The synthetic example is in essential.cljc:
(ns essential
#?(:cljs (:require-macros
[essential
:refer
[varialization]]))
;; The following line makes the difference. If this line is uncomment
;; the cljs.analyzer.api/analyze-file function will execute successfully
;; on essential.cljc
;; #?(:cljs (:use [cljs.core :only [coll?]]))
)
#?(:clj
(do
(defmacro varialization
[arg]
`(var ~arg))
))
(defn simple []
(varialization coll?))
With this file, you would get the weird message about the unresolvable coll?
symbol. If you uncomment the (:use [cljs.core :only [coll?]])
header line, the analysis succeed.
My interpretation is that, during the execution of analyze-file
on essential.cljc, the environment doesn't involve the cljs.core
namespace by default. So it doesn't find coll?
.
Questions: Is it true? If yes, is it intentional?@fabien.rozar intentional
you need to analyze core first
Hummm, OK, so I should analyse the core to update my environment and send it to the analyzer-file
function, this is it?
I believe there's a with-core
helper in the api
look for that
Nice, thank you for your amazing reactivity 🙂