-
Notifications
You must be signed in to change notification settings - Fork 214
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
[Java] Move (most of) the name mangling logic to the Refiner #3265
[Java] Move (most of) the name mangling logic to the Refiner #3265
Conversation
I feel good about the direction and the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for starting this
b140c28
to
64b0bd6
Compare
@baywet and @andrueastman this should be ready for review now 🙂 . |
@andreaTP a couple of integration tests for Java are failing, can you look into it before we review please? |
The failures looks legit, I probably missed something in the Error classes, I'll have a look 👍 |
6fecca4
to
d3c02ce
Compare
Ready for review now 👍 happy that the IT tests have detected this last detail 🙂 . for my future self, the incantation to run all the integration tests for one language: yq -e '.jobs.integration.strategy.matrix.description[]' .github/workflows/integration-tests.yml | xargs -I{} ./it/generate-code.ps1 -descriptionUrl '{}' -language java && ./it/exec-cmd.ps1 -descriptionUrl '{}' -language java |
93879ad
to
9042405
Compare
ready for the next review round 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this great contribution!
Will you be doing the same for other languages?
@andrueastman for final review and merge
I started this with the intention to get some traction on the subject and ... help 🙂 |
We should be able to provide help in validating the changes. |
This is already super valuable help!
I would argue that removing a design issue in the implementation is pretty important to be confident about the maturity level, as, in this case, it's excluding a lot of subtle bugs that are hard to find, hard to debug, and, ultimately, hard to solve (workarounds are very likely to introduce regressions). At my own peace, I'll try to catch up with the other languages 🙂
Coming from Scala we are amused to solve all of the problems with macros ...
This means that a Source Generator can analyze the source code and look up for usages of i.e.
|
Did you mean a code analyzer instead by any chance? |
That's correct, I wasn't aware of code analyzers, the same can likely be done inside a Source Generator, but the analyzer should suffice. |
Added a note in #2842 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @andreaTP
Sharing to receive early feedback on the direction (cc. @baywet).
I started with Java(instead of Python where we experienced more issues) as I felt more comfortable with it, but I believe that this effort should be extended to all of the languages.
You can check the results by running:
main
branch:dotnet publish ./src/kiota/kiota.csproj -c Release -p:PublishSingleFile=true -p:PublishReadyToRun=true -o ./publish
(cd src/kiota && dotnet build) && ./it/compare-generation.ps1 -descriptionUrl "oas::petstore" -language java