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

[improve][build] Add lombok plugin to solve Javadoc issue. #18520

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

Technoboy-
Copy link
Contributor

Motivation

When releasing branch-2.11, there is a issue when generating Javadoc :

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:javadoc (default-cli) on project pulsar-functions-api: An error has occurred in Javadoc report generation: 
[ERROR] Exit code: 1 - Loading source files for package org.apache.pulsar.functions.api...
[ERROR] Loading source files for package org.apache.pulsar.functions.api.utils...
[ERROR] Loading source files for package org.apache.pulsar.functions.api.state...
[ERROR] Constructing Javadoc information...
[ERROR] /Users/tboy/tboy/workspace_3/pulsar/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java:173: error: cannot find symbol
[ERROR]     <X> FunctionRecord.FunctionRecordBuilder<X> newOutputRecordBuilder(Schema<X> schema);
[ERROR]                       ^
[ERROR]   symbol:   class FunctionRecordBuilder
[ERROR]   location: class FunctionRecord
[ERROR] /Users/tboy/tboy/workspace_3/pulsar/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/utils/FunctionRecord.java:52: error: cannot find symbol
[ERROR]     public static <T> FunctionRecord.FunctionRecordBuilder<T> from(Context context, Schema<T> schema) {
[ERROR]                                     ^
[ERROR]   symbol:   class FunctionRecordBuilder
[ERROR]   location: class FunctionRecord
[ERROR] 2 errors
[ERROR] 
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk-17.0.3.1.jdk/Contents/Home/bin/javadoc @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/Users/tboy/tboy/workspace_3/pulsar/pulsar-functions/api-java/target/site/apidocs' dir.

We can use mvn javadoc:javadoc to reproduce in the master branch.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@Technoboy- Technoboy- self-assigned this Nov 17, 2022
@Technoboy- Technoboy- added this to the 2.12.0 milestone Nov 17, 2022
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 17, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2022

Codecov Report

Merging #18520 (ae7edfe) into master (aeb4503) will increase coverage by 3.67%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18520      +/-   ##
============================================
+ Coverage     31.39%   35.06%   +3.67%     
- Complexity     6651     6654       +3     
============================================
  Files           697      617      -80     
  Lines         68015    58514    -9501     
  Branches       7285     6099    -1186     
============================================
- Hits          21353    20519     -834     
+ Misses        43667    35268    -8399     
+ Partials       2995     2727     -268     
Flag Coverage Δ
unittests 35.06% <ø> (+3.67%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...on/buffer/impl/InMemTransactionBufferProvider.java 0.00% <0.00%> (-50.00%) ⬇️
...java/org/apache/pulsar/proxy/stats/TopicStats.java 58.82% <0.00%> (-41.18%) ⬇️
...ker/loadbalance/impl/LeastLongTermMessageRate.java 64.44% <0.00%> (-6.67%) ⬇️
...sar/broker/loadbalance/impl/LoadManagerShared.java 35.96% <0.00%> (-2.20%) ⬇️
...roker/loadbalance/impl/ModularLoadManagerImpl.java 61.53% <0.00%> (-1.18%) ⬇️
...a/org/apache/pulsar/proxy/server/ProxyService.java 80.00% <0.00%> (-0.94%) ⬇️
...apache/pulsar/proxy/server/LookupProxyHandler.java 57.75% <0.00%> (-0.44%) ⬇️
...e/bookkeeper/mledger/impl/NullLedgerOffloader.java
...mledger/impl/cache/RangeEntryCacheManagerImpl.java
...va/org/apache/bookkeeper/mledger/util/SafeRun.java
... and 175 more

@Technoboy- Technoboy- merged commit 705f5fd into apache:master Nov 18, 2022
@lhotari
Copy link
Member

lhotari commented Nov 24, 2022

@Technoboy- Did this PR solve the issue?
Just wondering about the docs in http://anthonywhitford.com/lombok.maven/lombok-maven-plugin/usage.html:

Place the java source code with lombok annotations in src/main/lombok (instead of src/main/java). During the build process, the src/main/lombok code will be delomboked and the generated java code ends up in target/generated-sources/delombok. The delomboked code is compiled and analysed together with the src/main/java code.

@tisonkun
Copy link
Member

@Technoboy- I think this the root cause that the generated javadoc for 2.11.0 using pytools becomes empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants