record-builder icon indicating copy to clipboard operation
record-builder copied to clipboard

Delete any pre-existing classfile for RecordInterface

Open Randgalt opened this issue 2 years ago • 1 comments

Fixes #139

It seems the existence of an old .class file for the record being generated by @RecordInterface is exposing a bug in javac. This change checks for the existence of the class file and deletes. It's an ugly hack but seems to work.

Randgalt avatar Mar 12 '23 13:03 Randgalt

@youribonnaffe and @cykl

As mentioned in #139 I've been able to reproduce the problem with IntelliJ when I manually compile a single interface annotated with @RecordInterface. In this instance, the presence of a .class file of the generated record from a previous compile is the source of the problem. If that .class file is deleted then compilation works correctly. This PR adds a hack that deletes any .class file for the record. Please let me know if it fixes the issue for you as well. If it does, we can figure out a way to make it less of a hack.

Randgalt avatar Mar 12 '23 13:03 Randgalt

Closed in favor of https://github.com/Randgalt/record-builder/pull/174

Randgalt avatar Mar 27 '24 17:03 Randgalt