-
Notifications
You must be signed in to change notification settings - Fork 150
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
add lombok extension #761
add lombok extension #761
Conversation
Signed-off-by: Esteban Mañaricua <emanaricua@gmail.com>
Signed-off-by: Esteban Mañaricua <emanaricua@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
As mentionned in https://github.com/eclipse/che-devfile-registry/pull/316/files#r544386479, the plugin won't work out of the box if the lombok.jar is not copied to /tmp/vscode-unpacked
. We cannot ask the user who would compose its devfile to magically know that something like that has to be copied from the devfile.
So first, does it means that we have something wrong in Che-theia ? why lombok.jar can't be found in the original location.
Then, would the workaround be to perform the lombok.jar copy from the plugin sidecar, by overriding the entrypoint ?
Last, I don't think it is a good idea to keep Java and Lombok into 2 seperate plugins: we would need to use mergePlugins (that was not working for me BTW) or share additional volumes like you did in your devfile. Again it is not straight forward for the user.
Tested with metadata:
generateName: java-maven-lombok-
attributes:
mergePlugins: 'true'
projects:
- name: lombok-project-example
source:
location: 'https://github.com/chuucks/LOMBOK-PROJECT-EXAMPLE'
type: git
branch: master
components:
- id: cool2k/vscode-lombok/latest
preferences:
java.server.launchMode: Standard
type: chePlugin
registryUrl: 'https://sutan-che-plugin-registry-dev-2vqkx.surge.sh/v3/'
- mountSources: true
endpoints:
- name: debug
port: 5005
attributes:
public: 'false'
memoryLimit: 512Mi
type: dockerimage
volumes:
- name: m2
containerPath: /home/user/.m2
image: 'quay.io/eclipse/che-java11-maven:7.22.1'
alias: maven
env:
- value: ''
name: MAVEN_CONFIG
- value: >-
-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4
-XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true
-Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/user
name: MAVEN_OPTS
- value: >-
-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4
-XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true
-Xms20m -Djava.security.egd=file:/dev/./urandom
name: JAVA_OPTS
- value: >-
-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4
-XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true
-Xms20m -Djava.security.egd=file:/dev/./urandom
name: JAVA_TOOL_OPTIONS
apiVersion: 1.0.0
commands:
- name: maven build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/lombok-project-example'
type: exec
command: mvn clean install
component: maven
|
I created that issue eclipse-che/che#18632 to see if this is a bug or not. But the extension should not required to set/copy the lombok.jar manually. It should be provided. |
The lombok extension is
To me it is not an issue to add a volume
That way, the vscode-java extension would have access to the Having said that, we have a blocker issue:
The problem is that the user settings are reused by any workspaces started by the same user. So if the user starts a new workspace with Java plugin without the lombok extension ... it would crash not finding the lombok.jar. Several proposals we could choose to solve that
|
Signed-off-by: Esteban Mañaricua emanaricua@gmail.com
@ericwill maybe better have che-theia-plugins.d/extension-name.yaml instead?
Closes: eclipse-che/che#17483
Signed-off-by: Esteban Mañaricua emanaricua@gmail.com