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

[AOSP-pick] Set moduleInfo on light class construction #7451

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

sellophane
Copy link
Collaborator

Cherry pick AOSP commit 5e907fbd0f6a77a1f8afcc8bcf399bb9e3e78a0a.

The existing pattern is that derived classes are supposed to call
setModuleInfo during their initialization. Most do, but some have
missed it, and this results in the Kotlin plugin not being able to
appropriately identify the classes.

I'm changing the code pattern to require ModuleInfo to be passed in
via the constructor. The parameter is currently nullable in the super AndroidLightClassBase for the cases that don't have module information yet, so this change shouldn't affect any behavior. I'll follow up with another change to actually set the module information.

Bug: n/a
Test: covered by existing
Change-Id: I2358ac1cd475880d76310df6b56fe04d64173017

AOSP: 5e907fbd0f6a77a1f8afcc8bcf399bb9e3e78a0a

The existing pattern is that derived classes are supposed to call
`setModuleInfo` during their initialization. Most do, but some have
missed it, and this results in the Kotlin plugin not being able to
appropriately identify the classes.

I'm changing the code pattern to require `ModuleInfo` to be passed in
via the constructor. The parameter is currently nullable in the super AndroidLightClassBase for the cases that don't have module information yet, so this change shouldn't affect any behavior. I'll follow up with another change to actually set the module information.

Bug: n/a
Test: covered by existing
Change-Id: I2358ac1cd475880d76310df6b56fe04d64173017

AOSP: 5e907fbd0f6a77a1f8afcc8bcf399bb9e3e78a0a
@sellophane sellophane requested a review from LeFrosch March 10, 2025 14:32
@github-actions github-actions bot added the awaiting-review Awaiting review from Bazel team on PRs label Mar 10, 2025
@LeFrosch LeFrosch merged commit 31d090f into master Mar 10, 2025
9 checks passed
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants