This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-06
Channels
- # announcements (2)
- # beginners (110)
- # calva (4)
- # cider (2)
- # cljs-dev (3)
- # cljsrn (1)
- # clojure (83)
- # clojure-dev (56)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-uk (19)
- # clojurescript (14)
- # core-async (1)
- # cursive (6)
- # datomic (1)
- # defnpodcast (1)
- # figwheel (1)
- # figwheel-main (87)
- # fulcro (7)
- # graphql (1)
- # luminus (3)
- # off-topic (5)
- # pedestal (6)
- # re-frame (1)
- # reagent (3)
- # shadow-cljs (22)
- # spacemacs (1)
- # specter (12)
Hmmm the .getMethod patch in this commit https://github.com/clojure/clojure/commit/7a6f5527c24b16b9f896725defa538b8e3fd7d28 is causing figwheel-main to fail, I traced it to the hawk library, https://github.com/wkf/hawk/issues/22
very interested to learn more. particularly, which jdk are you using when you see the issue? (or which ones exhibit the problem)
should be no change in behavior for 1.8 so that’s good :)
if you turn on *warn-on-reflection*
can you tell which reflective call it’s doing?
would also be interested in what you see on java 9 (I did manual tests on 8, 9, 10, and 11 with the change but of course there are lots of cases I didn’t test)
looks like a ton of interop in hawk as its all file / watch api stuff
having written very similar stuff and made it reflection-free, it’s tedious
yes, the change is entirely in the reflector
I would also try using --illegal-access=deny on your jvm - that may exhibit different behavior
the patch does not change anything wrt method order
I think understanding a specific case that is different would help me understanding the general issue
when reflecting, the method search is based on the type of the target object (since it’s reflective, that’s the only type we know). If a method is found that is not accessible (canAccess=false), then the new code looks for the same method in parent super classes to find the same method at a higher point that is accessible. Here “accessible” can mean multiple things but the primary case we care about is module accessibility.
I’ve tested a number of cases. clearly this is something that I didn’t think of.
so having specific case would be illuminating
I think warn-on-reflection would be most useful
as it will report when using reflectin
compareTo on what type?
what are you seeing when you use it though?
prob not interrupt or join - those are on threads
I assume someone is swallowing the likely exception somewhere
I’m going to assume that isDirectory is the same but I’m going to look at the usage more closely now
startsWith is interesting as it’s a default method on the interface and that’s one case I think might not be getting handled
startsWith on Path that is (also exists on String but I think it’s Path here)
oh, I have a repro
(def p (java.nio.file.Paths/get "src" (into-array String []))) (.startsWith p "s")
-> infinite loop
ok, I can take it from here
so no exception, it’s just pegging the watcher thread
thanks for blindly stumbling into it! :)
yeah, he messaged me too