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

Avoid javadoc warnings for Kotlin classes [SPR-15058] #19624

Closed
spring-issuemaster opened this issue Dec 27, 2016 · 8 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Dec 27, 2016

Janne Valkealahti opened SPR-15058 and commented

In my gradle build(5.0.0.BUILD-SNAPSHOTS, I don't use kotlin) I'm getting a lot of javadoc warnings which is a bit annoying.

javadoc/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/ListableBeanFactoryExtension.class): warning: Cannot find annotation method 'mv()' in type 'Metadata': class file for kotlin.Metadata not found
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/ListableBeanFactoryExtension.class): warning: Cannot find annotation method 'bv()' in type 'Metadata'
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/ListableBeanFactoryExtension.class): warning: Cannot find annotation method 'k()' in type 'Metadata'
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/ListableBeanFactoryExtension.class): warning: Cannot find annotation method 'd1()' in type 'Metadata'
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/ListableBeanFactoryExtension.class): warning: Cannot find annotation method 'd2()' in type 'Metadata'
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/BeanFactoryExtension.class): warning: Cannot find annotation method 'mv()' in type 'Metadata'
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/BeanFactoryExtension.class): warning: Cannot find annotation method 'bv()' in type 'Metadata'
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/BeanFactoryExtension.class): warning: Cannot find annotation method 'k()' in type 'Metadata'
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/BeanFactoryExtension.class): warning: Cannot find annotation method 'd1()' in type 'Metadata'
/home/jvalkealahti/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.0.BUILD-SNAPSHOT/a63d010dba9471353da8224792a8b9880418560d/spring-beans-5.0.0.BUILD-SNAPSHOT.jar(org/springframework/beans/factory/BeanFactoryExtension.class): warning: Cannot find annotation method 'd2()' in type 'Metadata'

It'd be great if you could craft these kotlin classes so that if project depends on spring 5, java builds would be less quiet. Difficult to say where these are coming from as I don't know anything about kotlin.


Affects: 5.0 M4

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 27, 2016

Sébastien Deleuze commented

Not sure yet how to avoid this issue, I will discuss that with Kotlin team.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 27, 2016

Janne Valkealahti commented

Just out of interest, what happens here?

I know that some people are forcing javadocs not to cause warnings/errors so I suppose this might actually be relatively huge pita for them. Well by forcing I mean that build will error out if people have been lazy for javadocs.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 29, 2016

Sébastien Deleuze commented

I have created a new project on http://start.spring.io with Gradle, Spring Boot 2.0.0.BUILD-SNAPSHOT and Spring Framework 5.0.0.BUILD-SNAPSHOT. When I run ./gradlew javadoc I don't see such warnings. Could you share a repro project that allows to reproduce this issue?

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 29, 2016

Janne Valkealahti commented

You're right I don't see it with initializer either. So this is something we do in spring umbrella projects. I.e cloning https://github.com/spring-projects/spring-statemachine and running with master

./gradlew clean api

I think I copied this api task from some other spring project and most of them using gradle does something similar for creating api docs. i.e. spring-security does same in github.com/spring-projects/spring-security/blob/master/docs/docs.gradle.

Maybe it's because of a way we collect classpath for javadocs which seem to get everything from a compile classpath.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 29, 2016

Janne Valkealahti commented

Maybe a side effect with multi-project gradle build where you need to create full api docs from a root project and then you naturally need to sweep through all sub-projects. I wonder if this is more of a nuance to us than to a normal end users?

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 29, 2016

Stéphane Nicoll commented

I think it is. Someone who would create an API for their own project wouldn't add Spring Framework, would they?

Having said that, perhaps there is a way to narrow down the package so that spring framework doesn't show up there?

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 29, 2016

Janne Valkealahti commented

Right I think good news is that this doesn't immediately affect any users and I think I'm fine to tweak my build file to silence these warnings. Maybe we can close this and wait for a next spring guy to complain about same thing :)

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 29, 2016

Sébastien Deleuze commented

Can't reproduce with Java 8 update 112, so I resolve this issue as won't fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.