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 java translation #1674

Closed
wants to merge 1 commit into from
Closed

Conversation

bishiboosh
Copy link
Contributor

This (tries to) fix #1284

@bishiboosh
Copy link
Contributor Author

@MarcinAman ok so as I said in #1284, this is what I've done so far. I hope most of it will be usable but I may have gone in a wrong direction.

First, I've added file annotations parsing and transformation in DefaultDescriptorToDocumentableTranslator (with accompanying tests).

The main part of the work is done in KotlinToJavaConverter, as I wanted to change the representation of the elements here and not just change their names in the SignatureProvider (that's what I did first, following your advice, but this caused a bunch of linking errors in the final documentation).
I'll let you peruse (and probably fix) my changes, but what I've done so far is:

  • use JVM name from file annotation to change class name of top-level elements
  • handled JVMName on functions, classes-like and properties (I think callables still need to be modified, I've left a TODO about that)
  • handled JVMSynthetic to ignore elements
  • handled JVMField and its interaction with const to transform functions to static

Let me know if any of my code isn't understandable, I'll try to help as best as I can, sorry I wasn't able to finish.

@MarcinAman
Copy link
Contributor

Thanks, you rock 🥇

For sake of being reviewable i've split this into 2 PR-s. First one is: #1675
I'll continue the work on the other 2 ☺️

@bishiboosh
Copy link
Contributor Author

@MarcinAman seeing as you just merged #1675 (🥳), do you want me to close this PR or do you still need it ?

@MarcinAman
Copy link
Contributor

I think it is no longer needed. Thank you very much for this 🥇

@MarcinAman MarcinAman closed this Jan 5, 2021
@bishiboosh bishiboosh deleted the feature/jvm-fixes branch January 5, 2021 13:35
@bishiboosh
Copy link
Contributor Author

@MarcinAman I saw that you've done JvmName and JvmField, do you want me to backport what I did on JvmOverloads (and/or JvmSynthetic) or are you working on it ?

@MarcinAman
Copy link
Contributor

I the following 2 weeks i wont be able to do it. If you have some spare time, sure go ahead. Even if you wont finish it I can pick up the work

@bishiboosh
Copy link
Contributor Author

bishiboosh commented Jan 27, 2021 via email

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

Successfully merging this pull request may close these issues.

DokkaJavadoc does not respect JVMName
2 participants