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

Fix compilation using ecj #2742

Merged
merged 2 commits into from
Mar 4, 2021
Merged

Conversation

Rawi01
Copy link
Collaborator

@Rawi01 Rawi01 commented Feb 7, 2021

This PR fixes #2738, fixes #2735, fixes #2729, fixes #2640, fixes #2633, fixes #285

The first commit moves all Eclipse only methods into a seperate inner class which only gets touched if Eclipse is available. I also tried to simplify the code. Basically this is a simpler version of #2634 that does not break the detection of already implemented methods.

The second commit solves the classloading problem by

  • changing ShadowClassLoader to reuse classes of the prepended classloader instead of creating a new ones
  • removing all direct references to ecj classes in ecj related methods in PatchFixesHider. As the Patch* classes get loaded by ShadowClassLoader they also use it for resolving all the ecj classes.
  • using transplant() for skipResolveInitializerIfAlreadyCalled(2). That is required because casting of the returned TypeBinding is not possible for method replacements.

I also removed the PatchExtensionMethodPortal because it was not used at all.

These changes are inspired a lot by rgra@6503177 from @rgra, thanks a lot for that and the tycho example project.

@rzwitserloot rzwitserloot merged commit bb36d95 into projectlombok:master Mar 4, 2021
@pzygielo

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment