specter icon indicating copy to clipboard operation
specter copied to clipboard

Warning in cljs project using shadow-cljs

Open Wonko7 opened this issue 5 years ago • 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"]

Wonko7 avatar Jun 06 '19 08:06 Wonko7

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.

nathanmarz avatar Jun 07 '19 19:06 nathanmarz

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?

dcostaras avatar Aug 06 '19 18:08 dcostaras

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

awkay avatar Aug 28 '19 17:08 awkay

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 avatar Aug 30 '19 08:08 Wonko7

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

dcostaras avatar Sep 02 '19 11:09 dcostaras

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

Wonko7 avatar Sep 03 '19 11:09 Wonko7