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

ArC - transform unproxyable bean classes by default #7837

Merged
4 commits merged into from
Mar 17, 2020

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Mar 13, 2020

  • new transformations: remove final flag from a bean class, change
    visibility of private no-args constructor
  • deprecate quarkus.arc.remove-final-for-proxyable-methods
  • introduce quarkus.arc.transfrorm-unproxyable-classes
  • this should also help kotlin developers where classes are final by
    default

@mkouba mkouba added the area/arc Issue related to ARC (dependency injection) label Mar 13, 2020
@mkouba mkouba added this to the 1.4.0 milestone Mar 13, 2020
@geoand
Copy link
Contributor

geoand commented Mar 13, 2020

I can't really tell if the TCK failure is related or not... The error is rather obscure. Can you give it a check @mkouba ?

@mkouba
Copy link
Contributor Author

mkouba commented Mar 13, 2020

That's a bug in the TCK: eclipse/microprofile-config#543

We do transform the ConfigObserver class but there is obviously some class loading problem, most probably related to our arquillian adapter.

I think I'll try to disable the transformation for MP Config TCK fow now...

@geoand
Copy link
Contributor

geoand commented Mar 13, 2020

OK, thanks

@geoand
Copy link
Contributor

geoand commented Mar 13, 2020

I like it a lot, +1. The implementation also looks straight-forward but I'll let @manovotn comment on that since this is his wheelhouse :)

Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, this actually fixes quite a few proxyability cases where we wouldn't pass TCK's exception expectations (deployment versus definition) :-)
Added just some minor questions/remarks.

- new transformations: remove final flag from a bean class, change
visibility of private no-args constructor
- deprecate quarkus.arc.remove-final-for-proxyable-methods
- introduce quarkus.arc.transfrorm-unproxyable-classes
- this should also help kotlin developers where classes are final by
default
- BeanProcessor.Builder.setRemoveFinalFromProxyableMethods()
@geoand
Copy link
Contributor

geoand commented Mar 17, 2020

Github UI is reporting a conflict

@mkouba
Copy link
Contributor Author

mkouba commented Mar 17, 2020

@geoand Yep, just in the middle of rebasing and testing ;-).

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Mar 17, 2020
@mkouba mkouba closed this Mar 17, 2020
@mkouba mkouba closed this Mar 17, 2020
@geoand
Copy link
Contributor

geoand commented Mar 18, 2020

Given how much this will improve the Kotlin experience (especially on Gradle where we can't yet propagate the correct plugins to dev mode), perhaps we should backport this to 1.3.x?
WDYT @mkouba @gsmet ?

@geoand
Copy link
Contributor

geoand commented Mar 18, 2020

I am actually thinking that this type of transformation could be applied in other areas that affect Kotlin as well...
That way we will be able to solve a lot of Kotlin issues in the Quarkus codebase itself and not have to rely on glue code in the build tool plugins which we may or may not be able to do (for Gradle we are facing issues that stem from the design of the Kotlin compiler that we obviously can't control).

@manovotn
Copy link
Contributor

perhaps we should backport this to 1.3.x?

I am not working in Kotlin so I cannot say how much of an issue is this. But if it's a biggie then I see no reason not to backport it.

@geoand
Copy link
Contributor

geoand commented Mar 18, 2020

At the moment, Kotlin + Gradle (which is what most Kotlin users use), does not work nice at all in dev-mode.
This PR really improves the situation.

We always knew this, but after actually witnessing this in action I am convinced that this approach is great.

@mkouba
Copy link
Contributor Author

mkouba commented Mar 18, 2020

+1 for the approach but I'm not so sure about backporting. (1) it's a breaking change. (2) we modified a lot of files so it might not be that easy to backport this PR.

@geoand
Copy link
Contributor

geoand commented Mar 18, 2020

I see, in that case if we are not sure about the feasibility of backporting, then I won't insist :)

@stuartwdouglas
Copy link
Member

If possible I would like to backport, but I understand that it might not be practical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/security triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants