This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-15
Channels
- # aws-lambda (3)
- # beginners (17)
- # boot (65)
- # cider (3)
- # cljs-dev (7)
- # cljsrn (82)
- # clojure (82)
- # clojure-italy (1)
- # clojure-russia (25)
- # clojure-spec (56)
- # clojure-uk (5)
- # clojurescript (52)
- # css (2)
- # datomic (6)
- # emacs (1)
- # hoplon (9)
- # jobs-discuss (5)
- # leiningen (8)
- # mount (2)
- # nginx (1)
- # off-topic (2)
- # om (1)
- # om-next (9)
- # perun (13)
- # portland-or (1)
- # re-frame (13)
- # reagent (20)
- # remote-jobs (2)
- # ring (5)
- # spacemacs (1)
- # specter (10)
- # untangled (5)
- # yada (6)
having a subtle issue with source-maps and tagged literals, when someone enters #js {}
into Dirac REPL, from repl.cljc code I get back something like #object[cljs.tagged_literals.JSValue 0x4e71af46 "cljs.tagged_literals.JSValue@4e71af46”]
as the original source code, this is a problem for my auto-complete system, which reads available cljs files and tries to parse ns forms from them. This is obviously invalid cljs file without defining some #object
reader.
I believe I was able to identify the problem. repl.cljc tries to fill in :sources-content
first by looking at :source
in form’s metadata, and if not avail it simply serializes the form using pr
:
https://github.com/clojure/clojurescript/blob/8e183ba8ad3eefea75c127a5fdb76c2925b809f0/src/main/clojure/cljs/repl.cljc#L476
It looks like tagged literals do not cary over :source
metadata. For example here:
https://github.com/clojure/clojurescript/blob/8e183ba8ad3eefea75c127a5fdb76c2925b809f0/src/main/clojure/cljs/tagged_literals.cljc#L85
I would expect something like (with-meta (JSValue. form) (extract-relevant-metadata form))
@dnolen Alibaba is creating Weex, which is like React Native. I don't if we can reuse the code we used for React Native. But I guess we may need to compile it with new tools(or new configurations).
It's using V8 on Android and JavaScriptCore on iOS, meanwhile runs in browsers and Node.js too. Same code on so many environments.
English docs is not all ready, informations can be found on GitHub https://github.com/alibaba/weex https://github.com/alibaba/rax
Based on the examples (https://github.com/alibaba/weex/blob/dev/examples/syntax/script-instance.we) they just use Common JS modules (npm)
Hard to say, as far as I know they use webpack loaders to translate code. And that looks more like CMD, which is a solution between AMD and CommonJS https://github.com/alibaba/weex/blob/dev/doc/specs/js-bundle-format.md#whole-syntax-and-structure-1 but still I not sure.