Closed planetf1 closed 3 years ago
Agreed in community call 20 Mar that we will go with #1 as a short term measure until we learn more about these issues (cc: @alexandra-bucur @lpalashevski @mandy-chessell @davidradl )
I plan to make change 1 today
It's great that you spotted those behaviours. I would like to investigate them a bit in order to see what can be done. The framework adds a lot of benefits, so maybe we can find solutions. For the moment I think it's great that you start with point 1 from your proposal today. Thank you for doing that.
@alexandra-bucur I've done step 1 - assigning for you to look at any of the remaining aspects/see if we can reduce the impact before expanding usage further?
@planetf1 I added the https://github.com/odpi/egeria/pull/5216 in the meantime in order to avoid the duplicate class errors in Intellij.
I will continue the investigation further for this issue :)
@planetf1 I added the #5216 in the meantime in order to avoid the duplicate class errors in Intellij.>
Added a note to the PR review -- this invocation of clean appeared to be breaking our javadoc generation, and with plugin installed I did not see dup class errors. see PR for longer comment
Taking a step back, we are trying lombok to reduce the overhead of writing and maintaining standard boilerplate code.
We could also look at either Google's 'AutoValues' or Immutables. Both work with standard java annotation processing which I think will fit more smoothly with regular dev tools. Lombok is a bit of an outlier due to it's bytecode manipulation ? I've not looked closely though nor checked to see how Javadoc may be handled. Nor indeed any other downsides...
AutoValues - https://github.com/google/auto/tree/master/value Immutables - https://immutables.github.io/immutable.html
I had an instance of the IntelliJ error today, using the very latest 2021.1.2 RC (EAP) with the lombok plugin active:
/Users/jonesn/IdeaProjects/egeria.maven/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/target/delombok/org/odpi/openmetadata/accessservices/assetlineage/ffdc/AssetLineageErrorCode.java:28:8
java: duplicate class: org.odpi.openmetadata.accessservices.assetlineage.ffdc.AssetLineageErrorCode
Whilst I normally only compile using the 'maven' option even within IntelliJ, today I looked at the IDE's support for module-info files, which caused the IDE to use it's own internal builder.. and hit this issue. Perhaps co-incidental, but this is probably also a scenario where a 'clean' task wouldn't help anyway since maven was not invoked here.
(I happened to be in AssetDescription.java and clicked on menu-> Code -> Generate module-info descriptors )
I hit this same problem again yesterday when refactoring , this time in data engine OMAS. IntelliJ (up to date, with plugin) was reporting dup classes in data-engine-api even though maven/cli was fine. This is restricted to a small set of components for now.
@planetf1 I managed to solve the duplicate class issue as described in https://github.com/odpi/egeria/pull/5216. Please see if the first comment in the conversation helps you restore your environment. On my side it looks good :)
Taking a step back, we are trying lombok to reduce the overhead of writing and maintaining standard boilerplate code.
We could also look at either Google's 'AutoValues' or Immutables. Both work with standard java annotation processing which I think will fit more smoothly with regular dev tools. Lombok is a bit of an outlier due to it's bytecode manipulation ? I've not looked closely though nor checked to see how Javadoc may be handled. Nor indeed any other downsides...
AutoValues - https://github.com/google/auto/tree/master/value Immutables - https://immutables.github.io/immutable.html
@planetf1 unfortunately these 2 alternatives are both limited to immutable classes which is not the case for us. I could't find a better alternative for our use case.
Lombok has recently been added to Egeria.
Firstly, we have now lost the embedded javadoc that is being packaged and sent to maven central, which prevents debugging of egeria properly.
Secondly When compile errors, warnings, notifications occur at the CLI or in an IDE, the errors reported relate to the delomboked version of the code ie:
18:23:04,463 [WARNING] /Users/jonesn/IdeaProjects/egeria.maven/open-metadata-implementation/governance-servers/data-platform-services/data-platform-services-connector/target/delombok/org/odpi/openmetadata/dataplatformservices/api/model/DataPlatformDeployedDatabaseSchema.java:[5,68] org.odpi.openmetadata.accessservices.dataplatform.properties.DeployedDatabaseSchema in org.odpi.openmetadata.accessservices.dataplatform.properties has been deprecated
At least 3 developers in the last few weeks have then gone to fix the delomboked code, and got confused as to why the fix didn't work....
An explicit delombok is needed to correctly produce javadoc, but I would suggest this confusion is adding to the cognitive load of developers working on the platform which could trap new contributors to the platform.
I think we should: