Fork me on GitHub
#shadow-cljs
<
2018-11-10
>
richiardiandrea00:11:41

I checked ProcessBuilder and they should be set

thheller09:11:22

@richiardiandrea the yarn process inherits the env of the shadow-cljs process

richiardiandrea17:11:27

I don't think it is shadow's fault but I get a lot of corrupted packages now from the registry and I cannot understand why

richiardiandrea17:11:40

Thanks for answering though!

Bravi17:11:37

hi everyone. can I use closure-defines in my release?

Bravi17:11:53

so basically can I add it here?

:release    {:compiler-options {:optimizations :advanced}}

gleisonsilva18:11:16

hello everyone! may u help me... after I've tried use a new lib in my project, I ended up messing up all npm and shadowcljs dependencies.. so I've decided do rollback all changes and clean-up node_modules and js/compiled folders (`js/compiled` is my output-dir). But... after that, a few warnings and misbehaviors shows up... the first one is these several warnings that compiler is now showing:

gleisonsilva18:11:58

------ WARNING #1 --------------------------------------------------------------
 File: mranderson048/re_frame/v0v10v2/re_frame/events.cljc:61:11
--------------------------------------------------------------------------------
  58 |       (if *handling*
  59 |         (console :error "re-frame: while handling \"" *handling* "\", dispatch-sync was called for \"" event-v "\". You can't call dispatch-sync within an event handler.")
  60 |         (binding [*handling*  event-v]
  61 |           (trace/with-trace {:operation event-id
-----------------^--------------------------------------------------------------
 Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.events/java
--------------------------------------------------------------------------------
  62 |                              :op-type   kind
  63 |                              :tags      {:event event-v}}
  64 |             (interceptor/execute event-v interceptors)))))))
  65 | 
--------------------------------------------------------------------------------

------ WARNING #2 --------------------------------------------------------------
 File: mranderson048/re_frame/v0v10v2/re_frame/subs.cljc:48:29
--------------------------------------------------------------------------------
  45 |   (let [cache-key [query-v dynv]]
  46 |     ;; when this reaction is no longer being used, remove it from the cache
  47 |     (add-on-dispose! r #(do (swap! query->reaction dissoc cache-key)
  48 |                             (trace/with-trace {:operation (first-in-vector query-v)
-----------------------------------^--------------------------------------------
 Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.subs/java
--------------------------------------------------------------------------------
  49 |                                                :op-type   :sub/dispose
  50 |                                                :tags      {:query-v  query-v
  51 |                                                            :reaction (reagent-id r)}}
  52 |                               nil)))
--------------------------------------------------------------------------------

------ WARNING #3 --------------------------------------------------------------
 File: mranderson048/re_frame/v0v10v2/re_frame/subs.cljc:111:4
--------------------------------------------------------------------------------
 108 |   "
 109 | 
 110 |   ([query]
 111 |    (trace/with-trace {:operation (first-in-vector query)
----------^---------------------------------------------------------------------
 Use of undeclared Var mranderson048.re-frame.v0v10v2.re-frame.subs/java
--------------------------------------------------------------------------------
 112 |                       :op-type   :sub/create
 113 |                       :tags      {:query-v query}}
 114 |      (if-let [cached (cache-lookup query)]
 115 |        (do
--------------------------------------------------------------------------------

gleisonsilva18:11:22

why these warnings?

gleisonsilva18:11:49

in shadow-cljs.end i've:

... 
:dependencies [
                [re-frame "0.10.5"]
                [day8.re-frame/re-frame-10x "0.3.3-react16"]
...

gleisonsilva18:11:21

If I remove re-frame-10x, these warnings goes away

gleisonsilva18:11:59

in package.json I have these dependencies:

"dependencies": {
		"@material-ui/core": "^1.3.1",
		"@material-ui/icons": "^1.1.0",
		"@material-ui/lab": "^1.0.0-alpha.5",
		"create-react-class": "^15.6.3",
		"highlight.js": "^9.13.1",
		"react": "^16.3.2",
		"react-dom": "^16.3.2",
		"react-flip-move": "^3.0.1",
		"react-highlight.js": "^1.0.7",
		"d3": "^3.5.16"
	},
	"devDependencies": {
		"shadow-cljs": "^2.4.17"
	}

gleisonsilva19:11:06

I've found that the issue started as version 2.7 of shadow-cljs after i've downgrade to 2.6.23, the issue is gone

richiardiandrea19:11:06

We also had to downgrade in a project with 2.7 and 1.10.439. I will open an issue soon-ish

thheller20:11:19

@gleisonsilva 2.7 started to validate some things more strictly which warns about stuff that otherwise didn't warn

thheller20:11:41

it is probably invalid code so the warning is most likely correct

👍 4
thheller20:11:21

if((i__34699_34962 < count__34698_34961)){
var vec__34702_34963 = chunk__34697_34960.cljs$core$IIndexed$_nth$arity$2(null,i__34699_34962);
var k__34636__auto___34964 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__34702_34963,(0),null);
var cb__34637__auto___34965 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__34702_34963,(1),null);
try{var G__34706_34970 = new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(mranderson048.re_frame.v0v10v2.re_frame.trace._STAR_current_trace_STAR_,new cljs.core.Keyword(null,"duration","duration",1444101068),duration__34635__auto___34957,cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([new cljs.core.Keyword(null,"end","end",-268185958),mranderson048.re_frame.v0v10v2.re_frame.interop.now()], 0))], null);
(cb__34637__auto___34965.cljs$core$IFn$_invoke$arity$1 ? cb__34637__auto___34965.cljs$core$IFn$_invoke$arity$1(G__34706_34970) : cb__34637__auto___34965.call(null,G__34706_34970));
}catch (e34705){if((e34705 instanceof java.lang.Exception)){
var e__34638__auto___34973 = e34705;
mranderson048.re_frame.v0v10v2.re_frame.loggers.console.cljs$core$IFn$_invoke$arity$variadic(new cljs.core.Keyword(null,"error","error",-978969032),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["Error thrown from trace cb",k__34636__auto___34964,"while storing",mranderson048.re_frame.v0v10v2.re_frame.trace._STAR_current_trace_STAR_,e__34638__auto___34973], 0));
} else {
throw e34705;

thheller20:11:34

if((e34705 instanceof java.lang.Exception)) is certainly not valid JS

thheller20:11:59

I'll see tomorrow if I can find where the invalid code is generated

thheller20:11:28

might add a compiler option to back off from the extra validation. seems like this broken code is present in plenty of libs