Clojurians
#cljs-dev
<
2017-01-15
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

darwin00:01:28

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 "[email protected]”] 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))

darwin00:01:55

should I fill a JIRA ticker and shoot for a patch?

jiyinyiyong04:01:05

@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).

jiyinyiyong04:01:10

It's using V8 on Android and JavaScriptCore on iOS, meanwhile runs in browsers and Node.js too. Same code on so many environments.

jiyinyiyong04:01:44

English docs is not all ready, informations can be found on GitHub https://github.com/alibaba/weex https://github.com/alibaba/rax

juhoteperi10:01:54

Based on the examples (https://github.com/alibaba/weex/blob/dev/examples/syntax/script-instance.we) they just use Common JS modules (npm)

jiyinyiyong14:01:59

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.