redplanetlabs/specter

Warning in cljs project using shadow-cljs

Opened this issue · 6 comments

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"]

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.

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

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

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?

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

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