Skip to content
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

Delete any pre-existing classfile for RecordInterface #147

Conversation

Randgalt
Copy link
Owner

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.

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
Copy link
Owner Author

@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 added a commit that referenced this pull request Mar 27, 2024
#147 attempted
to do this but it only did it for Record Interface classes.
This commit does it for all classes that are to be generated.
Ad hoc testing shows that it solves the problem.

Fixes #139
Randgalt added a commit that referenced this pull request Mar 27, 2024
#147 attempted
to do this but it only did it for Record Interface classes.
This commit does it for all classes that are to be generated.
Ad hoc testing shows that it solves the problem.

Fixes #139
Randgalt added a commit that referenced this pull request Mar 27, 2024
#147 attempted
to do this but it only did it for Record Interface classes.
This commit does it for all classes that are to be generated.
Ad hoc testing shows that it solves the problem.

Fixes #139
Randgalt added a commit that referenced this pull request Mar 27, 2024
#147 attempted
to do this but it only did it for Record Interface classes.
This commit does it for all classes that are to be generated.
Ad hoc testing shows that it solves the problem.

Fixes #139
@Randgalt
Copy link
Owner Author

Closed in favor of #174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant