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
question Further information is requested

Comments

@bootstraponline
Copy link

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 Further information is requested label Oct 9, 2019
@changusmc
Copy link
Contributor

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
Copy link
Author

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
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants