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

[java] Preserve array indicator in member docs and remove reliance on --add-opens in parser-next #295

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

alexander-yakushev
Copy link
Member

@alexander-yakushev alexander-yakushev commented Oct 23, 2024

Addresses #278.

The issue is quite confusing. Clojure's clojure.reflect namespace when dealing with square brackets [] transforms them to <> for whatever reason. In some places, it then transforms it back, e.g. in function clojure.reflect/typesym.

Orchard in different places removes <> indicators, possibly presuming they refer to generic arguments. However, with reflection, you can't get generics information anyway, since generics are not a runtime feature.

This PR ensures that things like java.lang.String<> are transformed back to java.lang.String[], and also doesn't do any "generics removal" for reflection-obtained docs.

UPDATE: This PR now also includes the rewrite of parser-next to use public interfaces instead of internal closed-module implementations. It's hard to merge these two big changes separately because some of the tests are inter-reliant.

@alexander-yakushev alexander-yakushev changed the title [java] Preserve array indicator in member docs [java] Preserve array indicator in member docs and remove reliance on --add-opens in parser-next Oct 24, 2024
Copy link
Member

@bbatsov bbatsov left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Great work!

@alexander-yakushev
Copy link
Member Author

@vemv Just FYI.

@alexander-yakushev alexander-yakushev merged commit 9f5d7a4 into master Oct 24, 2024
21 checks passed
@alexander-yakushev alexander-yakushev deleted the doc-arrays branch October 24, 2024 15:11
@vemv
Copy link
Member

vemv commented Oct 24, 2024

Sure, no issue 🤝

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.

3 participants