https://kotlinlang.org logo
#detekt
Title
# detekt
m

Marcelo Hernandez

02/04/2021, 12:03 AM
Hello. If I recall correctly, there used to be documentation in the Detekt GitHub repo containing the steps to run for those authoring pull requests. Not sure if it was removed or am I just not seeing it? 🤔
m

Marcelo Hernandez

02/04/2021, 12:04 AM
For example, the Gradle tasks to run.
Ah thank you
🙏 1
@gammax is it a known issue that
RedundantVisibilityModifierRuleSpec
tends to just hang when running
./gradlew build
?
g

gammax

02/04/2021, 12:28 AM
nope it’s not. As a reference our CI runs the same
gw build
task.
m

Marcelo Hernandez

02/04/2021, 12:28 AM
I’ve tried so far with JDK 11 and JDK 8 and seem to keep getting stuck there.
g

gammax

02/04/2021, 12:28 AM
Can you try to
gw --stop
?
m

Marcelo Hernandez

02/04/2021, 12:28 AM
I’ve done
gw --stop
a few times already.
g

gammax

02/04/2021, 12:29 AM
So please note that
gw build
actually takes some time 🤔
But yeah, the CI is green (~8 minutes) https://github.com/detekt/detekt/runs/1810042692
m

Marcelo Hernandez

02/04/2021, 12:30 AM
Hmm… at least when using JDK 11, I get the following `StackOverflowError`:
Copy code
ExplicitCollectionElementAccessMethodSpec > reports map element access with get method STANDARD_ERROR
    WARN: The registry key 'platform.random.idempotence.check.rate' accessed, but not loaded yet
Exception in thread "Thread-9" java/lang/StackOverflowError
        at java/util/HashMap.hash (java.base@9/HashMap.java:339)
        at java/util/HashMap.get (java.base@9/HashMap.java:552)
        at jdk/internal/reflect/Reflection.filterMethods (java.base@9/Reflection.java:276)
        at java/lang/Class.getMethodHelper (java.base@9/Class.java:1457)
        at java/lang/Class.getMethod (java.base@9/Class.java:1361)
        at java/lang/Object.hashCode (java.base@9/Object.java:122)
        at java/util/HashMap.hash (java.base@9/HashMap.java:339)
        at java/util/HashMap.get (java.base@9/HashMap.java:552)
        at jdk/internal/reflect/Reflection.filterMethods (java.base@9/Reflection.java:276)
        at java/lang/Class.getMethodHelper (java.base@9/Class.java:1457)
        at java/lang/Class.getMethod (java.base@9/Class.java:1361)
        at java/lang/Object.hashCode (java.base@9/Object.java:122)
        at java/util/HashMap.hash (java.base@9/HashMap.java:339)
        at java/util/HashMap.get (java.base@9/HashMap.java:552)
        at jdk/internal/reflect/Reflection.filterMethods (java.base@9/Reflection.java:276)
        at java/lang/Class.getMethodHelper (java.base@9/Class.java:1457)
        at java/lang/Class.getMethod (java.base@9/Class.java:1361)
        at java/lang/Object.hashCode (java.base@9/Object.java:122)
        at java/util/HashMap.hash (java.base@9/HashMap.java:339)
        at java/util/HashMap.get (java.base@9/HashMap.java:552)
        at jdk/internal/reflect/Reflection.filterMethods (java.base@9/Reflection.java:276)
Where this stack trace goes on for much longer than what I pasted.
I am now at 7+ minutes with
gw build
using JDK 8 and it’s still stuck on
RedundantVisibilityModifierRuleSpec
.
g

gammax

02/04/2021, 12:32 AM
mmm no idea 🤔 Haven’t really seen this before. I’d say let kill all the gradle daemons & java processes, do a
gw clean
and try again
m

Marcelo Hernandez

02/04/2021, 12:33 AM
👍
Sorry, but I can’t seem to get past this. I believe I have everything in place for my change though. Guess I’ll see what CI has to say about it. Thank you for your help. 🙂
👍 1
6 Views