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

Wrong configuration issue is not working #1325

Open
alyssoncs opened this issue Nov 27, 2024 · 1 comment
Open

Wrong configuration issue is not working #1325

alyssoncs opened this issue Nov 27, 2024 · 1 comment
Labels
bug Something isn't working toolchain:kotlin
Milestone

Comments

@alyssoncs
Copy link

alyssoncs commented Nov 27, 2024

Build scan link

https://scans.gradle.com/s/2eobagb7ri4xq

Plugin version

2.5.0

Gradle version

8.11.1

JDK version

21

(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version

2.0.20

(Optional) Android Gradle Plugin (AGP) version

Not an android project, but I can reproduce on a private android project I'm working on and can't share.

(Optional) reason output for bugs relating to incorrect advice

------------------------------------------------------------
You asked about the dependency 'org.jetbrains.kotlinx:kotlinx-datetime:0.6.1 (libs.kotlinx.datetime)'.
There is no advice regarding this dependency.
It was removed because it matched a bundle rule for org.jetbrains.kotlinx:kotlinx-datetime:0.6.1 (libs.kotlinx.datetime), which is already declared.
------------------------------------------------------------

Shortest path from :lib to org.jetbrains.kotlinx:kotlinx-datetime:0.6.1 (libs.kotlinx.datetime) for compileClasspath:
:lib
\--- org.jetbrains.kotlinx:kotlinx-datetime:0.6.1

Shortest path from :lib to org.jetbrains.kotlinx:kotlinx-datetime:0.6.1 (libs.kotlinx.datetime) for runtimeClasspath:
:lib
\--- org.jetbrains.kotlinx:kotlinx-datetime:0.6.1

Shortest path from :lib to org.jetbrains.kotlinx:kotlinx-datetime:0.6.1 (libs.kotlinx.datetime) for testCompileClasspath:
:lib
\--- org.jetbrains.kotlinx:kotlinx-datetime:0.6.1

Shortest path from :lib to org.jetbrains.kotlinx:kotlinx-datetime:0.6.1 (libs.kotlinx.datetime) for testRuntimeClasspath:
:lib
\--- org.jetbrains.kotlinx:kotlinx-datetime:0.6.1

Source: main
------------
(no usages)

Source: test
------------
(no usages)

Describe the bug

I have a kotlin library project generated by gradle init. It contains a single kotlin lib subproject, with a single public class with a public function returning kotlinx.datetime.Instant.

The subproject declares org.jetbrains.kotlinx:kotlinx-datetime as implementation, but since it has a kotlinx.datetime.Instant as a return value in a public function, it seems that the plugin should give me an advice to change it to api. Instead, it gives me no advice.

To Reproduce
Steps to reproduce the behavior:
I have a project where the issue happens on my local machine and on Github CI: https://github.com/alyssoncs/dagp-bug

Expected behavior

The plugin should tell me to change org.jetbrains.kotlinx:kotlinx-datetime from implementation to api

Additional context

In the CI I can see the following warnings:

> Task :lib:filterAdvice
ANTLR Runtime version 4.10.1 used for parser compilation does not match the current runtime version 4.13.1
ANTLR Tool version 4.10.1 used for code generation does not match the current runtime version 4.13.1
ANTLR Runtime version 4.10.1 used for parser compilation does not match the current runtime version 4.13.1

Can't see them in my local machine, even after doing a gradle clean.

@autonomousapps autonomousapps added bug Something isn't working toolchain:kotlin labels Dec 2, 2024
@autonomousapps autonomousapps added this to the next milestone Dec 2, 2024
@autonomousapps
Copy link
Owner

Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working toolchain:kotlin
Projects
None yet
Development

No branches or pull requests

2 participants