Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find org.jetbrains.kotlin:kotlin-reflect:. #253

Open
serpro69 opened this issue Oct 28, 2024 · 3 comments
Open

Could not find org.jetbrains.kotlin:kotlin-reflect:. #253

serpro69 opened this issue Oct 28, 2024 · 3 comments
Labels
bug 🐞 Something isn't working core 🧬 Issue related to :core module
Milestone

Comments

@serpro69
Copy link
Owner

Ref: #250 (comment)

Changes since last rc: v2.0.0-rc.6...8e77afd

@serpro69 serpro69 added bug 🐞 Something isn't working core 🧬 Issue related to :core module labels Oct 28, 2024
@serpro69 serpro69 added this to the 2.0.0 milestone Oct 28, 2024
@serpro69
Copy link
Owner Author

serpro69 commented Oct 28, 2024

@dees91 , I couldn't reproduce your issue on my end. I've just made a simple project in intellij w/o any dependencies but kotlin-faker, and that seems to work: https://github.com/serpro69/kotlin-faker-issue-253

Can you see if the same project works for you? And can you try to reproduce your issue there?

I wonder if the missing dependencies are due to some android specifics, where you need to explicitly add kotlin-reflect or smth like that?

Also, when I try to list dependencies from your repro project, I can see reflect dependency is reported as failed in a lot of places. So something is definitely going awry in the build process:

➜ ./gradlew :app:dependencies > deps.txt

mp.oKtCHvux8B on  main [?] is 📦 unspecified via 🅺 v2.0.20 via ☕ v17.0.12 …
➜ cat deps.txt | grep reflect
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
|    +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     |    +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
     +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
          +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
|    +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
|    +--- org.jetbrains.kotlin:kotlin-reflect FAILED
|    +--- org.jetbrains.kotlin:kotlin-reflect FAILED

Also, is it possible for you to bump kotlin to 2.0.20 or later? That's the only thing I can think of what could be causing dependency discrepancies. And it's also what has changed since kotlin-faker:2.0.0-rc.6, which was still on kotlin 1.9

@dees91
Copy link

dees91 commented Oct 28, 2024

I get a similar error in the project https://github.com/serpro69/kotlin-faker-issue-253:

kotlin-faker-issue-253:main: Could not find org.jetbrains.kotlin:kotlin-reflect:.
Required by:
    project : > io.github.serpro69:kotlin-faker:2.1.0-SNAPSHOT:20241028.081202-24

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

more info:

$ ./gradlew dependencies > deps.txt
$ cat deps.txt | grep reflect
     |    +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
     +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
          +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED
     +--- org.jetbrains.kotlin:kotlin-reflect FAILED

Maybe it works for you because you have something in the gradle cache and I don't?

@serpro69
Copy link
Owner Author

Thanks for the info @dees91 !

I've cleaned local caches for both maven and gradle, and I can still run the code locally.
However, the failed dependency I'm also getting now in the graph. So I'll try to find the root cause of that, and hopefully that will fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working core 🧬 Issue related to :core module
Projects
None yet
Development

No branches or pull requests

2 participants