Open jezovuk opened 5 years ago
Thank you for reporting this! It should be fixed in master, verifying before releasing
Great!
The 2.7.4 version doesn't seem to work in eclipse 4.10.0 using jdk 11. I am not seeing any errors other than the immutables classes not being generated. Moving back to 2.7.3 fixes the issue. This is perhaps the same issue?
most probably the same, the fix is in master but not released yet
I am not seeing any errors
@matt-isaman, in order to see the errors you need to open a view: "window/ show view / Error Log"
Sorry to bother you about this @elucash, but I wonder when you expect a release with this fix. I'm one of the "dinosaurs" in the office that still didn't switch to IDEA.
(Unfortunately I can't just downgrade to 2.7.3, because then I'd miss out on #884 :). )
@Stephan202 sorry for delays, I expect to release it on Fri/Saturday this week. Hope you can build from the sources (or take the snapshot jar) and shove it into Eclipse project settings / factory path in a meantime
I updated to 2.7.5
and this seems fixed. Thanks!
Just wanted to follow the "Getting Started" part. Downloaded the latest version of Eclipse: Version: 2019-03 M2 (4.11.0 M2)
Does not work.
org.immutables.value.internal.$processor$.$Processor threw java.lang.ClassCastException: org.immutables.value.internal.$processor$.meta.$CachingElements$CachingTypeElement cannot be cast to org.eclipse.jdt.internal.compiler.apt.model.IElementInfo at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeProcessingEnvImpl.getEnclosingIFile(IdeProcessingEnvImpl.java:147) at org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeFilerImpl.createSourceFile(IdeFilerImpl.java:186) at org.immutables.value.internal.$generator$.$Output$SourceFile.complete($Output.java:313) at org.immutables.value.internal.$generator$.$Output$7.invoke($Output.java:177) at org.immutables.value.internal.$generator$.$Intrinsics.$($Intrinsics.java:96) at org.immutables.value.internal.$processor$.$Generator_Immutables._t0__generate($Generator_Immutables.java:20) at org.immutables.value.internal.$processor$.$Generator_Immutables$FragmentDispatch.run($Generator_Immutables.java:19603) at org.immutables.value.internal.$generator$.$Templates$Fragment.invoke($Templates.java:248) at org.immutables.value.internal.$generator$.$AbstractGenerator.invoke($AbstractGenerator.java:57) at org.immutables.value.internal.$processor$.$Processor.process($Processor.java:77) at org.immutables.value.internal.$generator$.$AbstractGenerator.process($AbstractGenerator.java:87) at org.immutables.processor.ProxyProcessor.process(ProxyProcessor.java:72) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:142) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:124) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:171) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:138) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:940) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:450) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:386) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:214) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:318) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:79) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:264) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:182) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
does update to 2.7.5 fixes this?, thank you
Well, it was quite strange. I used 2.7.5 and I still got errors although I restarted Eclipse and cleaned and rebuild the project. Then I closed the project and reopened it late to have a look again at the classes while reading the guide and after opening the project somehow everything (class file generation) worked and consequently there were no errors. Strange.
I can be result of m2e updating .factorypath
not exactly when project dependency changed. Even if jar configured manually in UI (on project settings, Java Compiler -> Annotation Processing), the change usually requires open/close project or restarting eclipse
I did restart several times. Both "Restart" from the "File" menu and shutting Eclipse down and starting it anew.
FYI: I used the manual configuration (although using Maven) and didn't install m2e-apt connector.
Note: the screenshots in the IDE setup guide are not up-to-date: http://immutables.github.io/apt.html For example screenshots show that you should add generate-tool-0.13.jar. I added value-2.7.5.jar instead. Also the textual description of this guide could be clearer. Subtle changes would be enough. For example point out that you have two options with Eclipse:
EITHER
OR
I dunno, m2e-apt only relevant for someone using maven. If not maven, then the manual option is a way to go (or generate .factorypath
using some tool related to the build system). The screenshot is dated and better to be updated, of course, but the approach itself is still sound. Also, what is not mentioned in the guide, many people may prefer to just build tool to do processing and just add source directories with generated files to .classpath
)
Using Immutables 2.7.4 with Eclipse 4.9.0 on JDK 1.8.192.
Exception: