Fork me on GitHub
#shadow-cljs
<
2020-03-20
>
steveb8n00:03:08

random question: I’m trying to invoke a single file emitted by shadow via the graalvm polyglot context (i.e. from jvm clojure). It fails to load due to an error stating “org.graalvm.polyglot.PolyglotException: ReferenceError: global is not defined” I presume this is goog.global. My question is: could this work or am I trying to do something in the “too hard” basket?

steveb8n00:03:19

extra info: graal polyglot does not support nodejs modules so it needs to be a single js artifact. for that reason, I used :node-script as the target

thheller08:03:24

as the :node-script name suggests that is meant for node ...

thheller08:03:34

graal would be its own target but I didn't look into that yet

steveb8n23:03:20

ah yes, of course. I had answered my own question without knowing it. thanks. I’ll go with the other architecture instead.

sergey.shvets04:03:24

Hi, I'm new here! Thanks for the awesome compiler! I'm migrating from figwheel + cljs-oops/cljsjs/externs and couldn't be happier to throw away a few layers of dependencies and be able to use npm's packages!

sergey.shvets04:03:09

I have a question: I have lein managing my dependencies and can successfully build an app using lein-shadow plugin. But I don't understand how I can run a build-report using lein dependencies? I want to see what adds size to my package. Thanks!

thheller08:03:46

I don't recommend using lein-shadow but the config it generated should be enough to be able to run a regular build report

thheller08:03:00

either through shadow-cljs or via lein run

sergey.shvets15:03:13

Thanks! It was giving me getSourceName not found error. But after I run lein shadow release app and then immediately build a report it worked. Not sure what was the problem, I'll dig deeper next time I generate a report.

thheller17:03:12

that error points to a version conflict on the closure-compiler dependency

sergey.shvets17:03:41

Got it. Now I see what doc meant about weird java stack traces with lein and, indeed, I had a closure compiler in my dependency vector that was different from the one that shadow depends on. I removed any mentions of closure compilers in my dependency vector and will let shadow manage it for me. Everything seems to be back to normal. Thanks for all the help!

sergey.shvets04:03:49

Running compilation before the report seems to solve the problem above and remove a weird java stack trace. Is it a requirement to run a compilation before generating a report?

fabrao06:03:14

hello all, how do I convert

import EStyleSheet from 'react-native-extended-stylesheet';
to clojurescript ?

fabrao06:03:06

I tried ["react-native-extended-stylesheet" :default EStyleSheet] and it´s giving Can´t find variable EStyleSheet

fabrao06:03:34

when using (EStyleSheet.create)

thheller08:03:10

@fabrao (EStyleSheet.create) thats invalid, should be (.create EStyleSheet)

davewo16:03:04

@thheller would you be interested in making the build cache aware of content of source files, instead of mod times? Tracking hashes in the cache perhaps? We are trying to keep our docker build self-contained and tracking file content would allow us to re-use the cache between docker builds.

thheller17:03:18

@davewo open a ticket, I'll think about it

martinklepsch19:03:23

Is this meant to be the same:

shadow-cljs cljs-repl $BUILD_ID

(require '[shadow.cljs.devtools.api :as s])
(s/node-repl $BUILD_ID

martinklepsch19:03:03

I’m seeing some weird differences around :node reader conditionals between those

martinklepsch19:03:12

specifically the CLI invocation properly gets a REPL that has :node stuff read and the Clojure API one doesn’t

martinklepsch19:03:17

Oh just realizing that I’m using the API wrong

lambdam19:03:02

Hello, I am discovering shadow-cljs for a personal project. I use Emacs. I'm used to figwheel way of working. When there is a compilation error (for any reason), the completion in Emacs ceases to work. This makes coding quite painful. It's not the case in figwheel. Will it change in future versions? Thanks

dpsutton19:03:16

can you open an issue on cider's github issue tracker with a minimal repro and I can attempt to find out what's going on?

lambdam10:03:24

Sorry for late reply. Yes I'll take time for that. Thanks.