-
Notifications
You must be signed in to change notification settings - Fork 6k
Upstream AndroidX KlibDumpParser #5470
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
base: master
Are you sure you want to change the base?
Conversation
Thanks @ivandev0, that sounds good to me! |
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.
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!
compiler/util-klib-abi/test/org/jetbrains/kotlin/library/abi/parser/TestExtensions.kt
Outdated
Show resolved
Hide resolved
compiler/util-klib-abi/src/org/jetbrains/kotlin/library/abi/parser/KLibDumpParser.kt
Outdated
Show resolved
Hide resolved
compiler/util-klib-abi/src/org/jetbrains/kotlin/library/abi/parser/KLibDumpParser.kt
Outdated
Show resolved
Hide resolved
compiler/util-klib-abi/src/org/jetbrains/kotlin/library/abi/parser/KLibDumpParser.kt
Outdated
Show resolved
Hide resolved
compiler/util-klib-abi/src/org/jetbrains/kotlin/library/abi/parser/KLibDumpParser.kt
Outdated
Show resolved
Hide resolved
compiler/util-klib-abi/test/org/jetbrains/kotlin/library/abi/parser/KLibDumpParserTest.kt
Show resolved
Hide resolved
) | ||
} | ||
|
||
private fun parseAbiQualifiedName(parentQualifiedName: AbiQualifiedName?): AbiQualifiedName { |
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.
It does not work for top-level functions belonging to a root package (there's no parent qualified name and parseAbiQualifiedName
returns null
).
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.
And there are problems with other top-level declaration residing in a root package too.
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.
Made a change to handle blank package for root and some tests, but let me know if I misunderstood the issue.
...ler/util-klib-abi/src/org/jetbrains/kotlin/library/abi/parser/KlibParsingCursorExtensions.kt
Outdated
Show resolved
Hide resolved
compiler/util-klib-abi/test/org/jetbrains/kotlin/library/abi/parser/KLibDumpParserTest.kt
Show resolved
Hide resolved
compiler/util-klib-abi/src/org/jetbrains/kotlin/library/abi/parser/KLibDumpParser.kt
Outdated
Show resolved
Hide resolved
Thanks for the review! All those comments make sense, I'll take a look shortly. |
a9b5c2c
to
42ca57b
Compare
42ca57b
to
81000a7
Compare
Add KlibDumpParser from AndroidX repository into util-klib-abi
81000a7
to
f42d038
Compare
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! |
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!