> Tycho compiles with ecj, right?
I guess. The compilerid is 'JDT' which makes me think it's ecj.
> If so, all you need to somehow make happen is that when the tycho plugin fires up ecj, it sneaks this argument onto the JVM bootup parameter list:
> -javaagent:lombok.jar
To run lombok as javaagent, (I guess) I've to run the compile goal with fork=true as shown below. Unfortunately, I get:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.13.0:compile (default-compile) on project org.eclipse.recommenders.lombok: Fatal error compiling: compileoutOfProcess not supported -> [Help 1]
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<fork>true</fork>
<compilerArgument>-javaagent:/Users/Marcel/Downloads/lombok.jar</compilerArgument>
</configuration>
</plugin>
Without fork=true I get:
[INFO] Compiling 2 source files to /Users/Marcel/Workspaces/eclipse.org/lombok-test/target/classes
Unrecognized option : -javaagent:/Users/Marcel/Downloads/lombok.jar
Any idea?
> so, i.e.:
>
> java -javaagent:lombok.jar -jar ecj.jar -source 1.6 -target 1.6 -classpath etc etc etc <- these are the args to ecj, not the VM.
>
> then there should be no need to mess with delombok to make tycho work for you. If tycho worked with java, then unless tycho forcibly disables annotation processing the way the play framework does, it should 'just work', no need for strange config.
>
> Unfortunately build tools aren't all that great at allowing you to pass VM parameters when invoking the compiler, so that might be an issue. If push comes to shove, we can contact the tycho team and ask them to add the ability to set VM args, or, failing that, make a tycho fork which is a carbon copy except for allowing you to set VM args some way. I tried googling to see if tycho can do this, but I keep finding pages on how to set the VM args to launch the built end-product, not the VM args for when tycho invokes the compiler during the build process.
Maybe we should send a request to tycho?
> Yes, lombok uses unsupported API to hook into ecj. Not as a dirty shortcut, but, there's simply no other way to do what lombok does without doing so.
What would be needed to make it 'supported'?
Thanks,
Marcel
I guess. The compilerid is 'JDT' which makes me think it's ecj.
To run lombok as javaagent, (I guess) I've to run the compile goal with fork=true as shown below. Unfortunately, I get:
Maybe we should send a request to tycho?
> Yes, lombok uses unsupported API to hook into ecj. Not as a dirty shortcut, but, there's simply no other way to do what lombok does without doing so.
What would be needed to make it 'supported'?