redplanetlabs / specter

Clojure(Script)'s missing piece
Apache License 2.0
2.53k stars 105 forks source link

Warning in cljs project using shadow-cljs #280

Open Wonko7 opened 5 years ago

Wonko7 commented 5 years ago

Hi!

------ WARNING #2 - :redef-in-file ---------------------------------------------
 File: /home/wonko/work/thing/src/thing/core.cljs:90:38
--------------------------------------------------------------------------------
  87 |   ;; FIXME: sanity check this!
  88 |   (async (await (reset-auth))
  89 |          (try
  90 |            (let [user-data         (setval [:account-reference-number] (mk-account-reference user) user-data)

I'm requiring it like this:

(ns thing.core
  (:require
    [com.rpl.specter :as s :refer [setval select-one]])

Am I doing something wrong?

I'm using: [com.rpl/specter "1.1.3-SNAPSHOT"]

nathanmarz commented 5 years ago

CLJS has been quite a moving target, so it's not surprising when warnings appear that didn't appear before. I'm not familiar with shadow-cljs so I don't know if that can have different warnings than other cljs compilation methods. If you or anyone figures this out, I'm happy to accept a pull request for it.

dcostaras commented 5 years ago

Hi @Wonko7, I'm currently compiling my project with shadow-cljs, using 1.1.3-SNAPSHOT and not seeing that warning compiling similar code. Are you still getting the warning? If so, what version of shadow-cljs are you using?

awkay commented 5 years ago

I agree with @pseudonamed ...something in 1.1.3-SNAPSHOT fixes the warning.

Wonko7 commented 5 years ago

That's weird, I'm using [com.rpl/specter "1.1.3-SNAPSHOT"] with shadow-cljs 2.8.52, and I'm still getting :redef-in-file warnings on setval with the message pathcache77013 at line 123 is being replaced.

What could I be missing?

dcostaras commented 5 years ago

@Wonko7, I'm unsure; can you create a minimal public repo that reproduces the error?

Wonko7 commented 5 years ago

Yes, it's an interaction between cloroutine & specter: https://github.com/Wonko7/warning-specter-async