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

AST vs bytecode? #8

Closed
bootstraponline opened this issue Oct 9, 2019 · 2 comments
Closed

AST vs bytecode? #8

bootstraponline opened this issue Oct 9, 2019 · 2 comments
Labels

Comments

@bootstraponline
Copy link

@bootstraponline bootstraponline commented Oct 9, 2019

I'd love to know more about why dropbox selected AST parsing compared to bytecode parsing. I think one advantage of bytecode parsing is it works with any language.

Does hypershard-android parse the AST for both Java and Kotlin?

https://github.com/linkedin/dex-test-parser

@changusmc changusmc added the question label Oct 9, 2019
@changusmc

This comment has been minimized.

Copy link
Member

@changusmc changusmc commented Oct 9, 2019

Great question!

On a high level, (1) we collect the tests on a single node in CI. That node will then give the list of tests and the scripts to run. (2) Then the our CI system will spin up N nodes and order the balance each node. Each node then will build the apk and test apk.

In our internal CI system, it's not trivial to share artifacts between builds. Therefore, it's prudent (1) to be very fast. If we did bytecode parsing, it would slow down (1).

hypershard-android parses both Java and Kotlin, please see https://github.com/dropbox/hypershard-android/blob/master/src/main/kotlin/com/dropbox/mobile/hypershard/Hypershard.kt#L116-L205

@bootstraponline

This comment has been minimized.

Copy link
Author

@bootstraponline bootstraponline commented Oct 9, 2019

That makes perfect sense. Thanks for explaining!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.