-
Notifications
You must be signed in to change notification settings - Fork 41
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
Introduce SignatureBuilder API #147
Conversation
Looks great! I added some minor comments, and I have 2 more general here:
|
d110414
to
3f66373
Compare
Well, we would have to use some abstract superclass because interfaces cannot declare private members and we use these methods in impls. I don't think that it's a problem.
Hmm. I'm not sure. From user's POV I think that the name "type variable" is more understandable. In any case, I believe that the current version is "good enough". |
Added one commit that refactors the The tests could use some improvements -- I'll get to it next week. |
I will have a look on Monday and try to use it in Quarkus GitHub App. |
Back from my PTO. I will use these changes in some Quarkus extensions to give some feedback asap. Thanks! |
@Ladicek I can't say I like all those
Feel free to improve the coverage ;-). |
I don't like the |
6877680
to
634a4b6
Compare
Done. |
Ok, I think that we're ready to go. We could either merge this PR and improve the coverage in a follow-up or wait a little... WDYT? |
Maybe wait for this afternoon? I want to test it on Quarkus GitHub App and report back. |
(Working on Sergey's PR this morning so can't work on that now) |
👍 |
I did add the most interesting test case I wanted (the horror of inner classes). There's more that could be done for methods, but I feel the code by now is correct by construction. I have a very similar piece of code in Jandex with a lot more tests, so I feel pretty good about what we have. |
@Ladicek yeah I was thinking of either that, or have several flavors of We would then push them to the Just pushing ideas, I will let you decide what's best. |
Passing a |
I think we could just add an overload of |
Another option would be to create a That would probably be a bit better than passing a builder. |
Except that it would require one more useless allocation... |
Also one more [otherwise] useless class. I didn't get to trying it yet (generic signatures and descriptors are so much fun... :-) ), but I suspect using a builder will be just fine. |
I fail to see how it would ever be in the hot path. But I won't fight for it. I can live with what's already there if you all think it's the way to go. |
Didn't want my review to be blocking, I will let you all have fun with it and merge :). |
No problem. It's a great feedback. Thanks! |
I have something... will add a commit - feel free to refactor/throw it away. |
No throwing away, this is pretty much what I thought I'd do. I think it's fine. |
@gsmet How about something like this? https://github.com/quarkusio/gizmo/pull/147/files#diff-f3ceec916aa72c0ab7318fa5821d400412118071f45e55d13310c5f4a3796df9R260-R274 |
Much better, me likey! |
Yay! 😆 |
From quarkusio/gizmo#147, we can use the latest SignatureBuilder API. To use the new SignatureBuilder API, I had to deal with the gizmo type class, so more changes than expected were necessary.
From quarkusio/gizmo#147, we can use the latest SignatureBuilder API. To use the new SignatureBuilder API, I had to deal with the gizmo type class, so more changes than expected were necessary.
From quarkusio/gizmo#147, we can use the latest SignatureBuilder API. To use the new SignatureBuilder API, I had to deal with the gizmo type class, so more changes than expected were necessary.
From quarkusio/gizmo#147, we can use the latest SignatureBuilder API. To use the new SignatureBuilder API, I had to deal with the gizmo type class, so more changes than expected were necessary.
From quarkusio/gizmo#147, we can use the latest SignatureBuilder API. To use the new SignatureBuilder API, I had to deal with the gizmo type class, so more changes than expected were necessary.
This pull request supersedes #116.
Usage example:
See also
io.quarkus.gizmo.SignaturesTest
.