Skip to content

Conversation

fsladkey
Copy link

Add KlibDumpParser from AndroidX repository into util-klib-abi

As discussed with @fzhinkin, this is a slightly edited version of the KlibDumpParser from our repo. Most changes are in the tests to remove explicit references to androidx classes as well as some tests which parsed full dumps from androidx libraries because I wasn't sure that was appropriate to include. I left the original copyright but of course changed packages.

It's a large PR, I considered trying to break this up into pieces but I figured I'd start here and break it up if necessary.

Looking forward to your feedback, thanks!

@fsladkey fsladkey requested a review from a team as a code owner June 30, 2025 14:30
@fsladkey fsladkey requested a review from ivandev0 June 30, 2025 14:30
@ivandev0
Copy link
Contributor

Hi @fsladkey!

Thank you for the contribution! I will kindly ask you to wait approximately a week until @fzhinkin is back from his vacation. He should be the main reviewer of this as he has the most experience in this area.

@fsladkey
Copy link
Author

Thanks @ivandev0, that sounds good to me!

@fzhinkin fzhinkin self-assigned this Jul 7, 2025
@fzhinkin fzhinkin self-requested a review July 7, 2025 13:01
Copy link
Contributor

@fzhinkin fzhinkin left a comment

Choose a reason for hiding this comment

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

Sorry for a delay with the review. And thank you for contributing the parser, I really appreciate it!

There are a few implementation specific questions I have, but the major one is about separating parsing a merged dump file produced by BCV and parsing a dump for a single klib-target emitted by this module.
Otherwise, it looks good, nice job!

)
}

private fun parseAbiQualifiedName(parentQualifiedName: AbiQualifiedName?): AbiQualifiedName {
Copy link
Contributor

Choose a reason for hiding this comment

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

It does not work for top-level functions belonging to a root package (there's no parent qualified name and parseAbiQualifiedName returns null).

Copy link
Contributor

Choose a reason for hiding this comment

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

And there are problems with other top-level declaration residing in a root package too.

Copy link
Author

Choose a reason for hiding this comment

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

Made a change to handle blank package for root and some tests, but let me know if I misunderstood the issue.

@fsladkey
Copy link
Author

fsladkey commented Aug 6, 2025

Thanks for the review! All those comments make sense, I'll take a look shortly.

@fsladkey fsladkey force-pushed the upstream-klib-dump-parser branch 3 times, most recently from a9b5c2c to 42ca57b Compare August 18, 2025 22:14
@fsladkey fsladkey force-pushed the upstream-klib-dump-parser branch from 42ca57b to 81000a7 Compare September 6, 2025 01:10
Add KlibDumpParser from AndroidX repository into util-klib-abi
@fsladkey fsladkey force-pushed the upstream-klib-dump-parser branch from 81000a7 to f42d038 Compare September 6, 2025 01:13
@fsladkey
Copy link
Author

fsladkey commented Sep 6, 2025

Sorry for the delay once again. Fixed the issue with package names and also addressed some issues with formatting of context params. Let me know what you think!

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