This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-05
Channels
- # 100-days-of-code (13)
- # announcements (3)
- # beginners (120)
- # boot (17)
- # calva (19)
- # cider (27)
- # cljdoc (3)
- # cljs-dev (1)
- # clojure (138)
- # clojure-dev (5)
- # clojure-italy (5)
- # clojure-nl (20)
- # clojure-russia (3)
- # clojure-spec (14)
- # clojure-uk (119)
- # clojurescript (45)
- # core-async (2)
- # datomic (23)
- # editors (28)
- # emacs (35)
- # figwheel (2)
- # fulcro (26)
- # graphql (2)
- # hyperfiddle (11)
- # jobs (4)
- # luminus (5)
- # mount (2)
- # off-topic (52)
- # onyx (39)
- # reagent (86)
- # ring-swagger (2)
- # spacemacs (20)
- # tools-deps (9)
- # yada (4)
mine was merged yesterday, so today I get to fix a bug because the person that was working on it, doesn’t work today
i decided today that i officially hate protocols now, and i'm going to replace it with multimethods
i am having the weirdest repl-reload issues with protocols, which apparently is due to the order in which clojure.tools.repl.reload reloads the files
which leads in functions such as (partial instance? Foo x)
suddenly throwing errors, because the derivative of Foo
is not loaded yet at that point
@lmergen Why not use tools.namespace
instead for reloading? They have a dedicated section in their docs that explains the problem with reloading protocols. https://github.com/clojure/tools.namespace#warnings-for-protocols
just looked, i'm using integrant.repl/reset-all, which apparently uses tools.namespace under the hood
what i'm running into is more subtle, though -- https://dev.clojure.org/jira/browse/CLJ-2094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
i nailed it down to (. (:on-interface Foo) (isInstance x))
returning False, even when (supers (class x))
contains Foo
It’s quite surprising that they are loaded in the wrong order since tools.namespace
keeps a dependency graph of namespaces so that they are loaded in the correct order.
but it's a very, very annoying issue to debug, and i figured one of the leading causes is that it's not simple data, it's types
I can imagine. Hope you figure it out.