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

add a new annotation ClassName to be used to indicate the real type of the parameters #9063

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mia0451
Copy link

@Mia0451 Mia0451 commented May 8, 2024

Overview

Currently some functions in shadow(s) are using Object as the type of the parameter which is not 100% matched the function signature of the shadowed class.

Proposed Changes

Create a new annotation which could be used to denote the real type of those Object parameters.

@utzcoz utzcoz requested a review from hoisie May 9, 2024 07:53
@utzcoz
Copy link
Member

utzcoz commented May 19, 2024

@Mia0451 I recommend you switching to use comments to add types for these APIs instead of WithType. IIRC, there are some code use WithType, but I don't think it is proper to use WithType correctly.

I can merge this PR after switching to comments.

Copy link
Contributor

@hoisie hoisie left a comment

Choose a reason for hiding this comment

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

Can you create a new annotation called @ClassName that is in the Robolectric annotations project? Same directory as @Implementation. That should be used instead

@Mia0451 Mia0451 force-pushed the feat1 branch 2 times, most recently from d3d44de to 4c6d701 Compare May 19, 2024 18:01
@Mia0451 Mia0451 changed the title add WithType for ShadowActivityManager, ShadowBitmap add a new annotation ClassName to be used to indicate the real type of the parameters May 19, 2024
@Mia0451
Copy link
Author

Mia0451 commented May 19, 2024

Created a ClassName annotation, almost same as existing WithType annotation.

@utzcoz
Copy link
Member

utzcoz commented May 20, 2024

@Mia0451 squash to one commit and use ClassName to replace WithType for your changes.

@hoisie
Copy link
Contributor

hoisie commented May 23, 2024

This looks great! Can you squash the commits and then I can merge?

@Mia0451
Copy link
Author

Mia0451 commented May 24, 2024

Hello utzcoz@ and hoisie@,
I just squared to one commit, but removed those ShadowXXX class changes, I plan to do it in next PR, is it ok?

Copy link
Member

@utzcoz utzcoz left a comment

Choose a reason for hiding this comment

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

np. LGTM.

@utzcoz
Copy link
Member

utzcoz commented May 25, 2024

@Mia0451 You need fix code style and commit message checking.

@utzcoz
Copy link
Member

utzcoz commented May 25, 2024

@Mia0451 The issue still exist. I think you need to learn what these tasks by checking Robolectric's workflow files.

@Mia0451
Copy link
Author

Mia0451 commented May 26, 2024

got you, reading the error msg now.

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.

None yet

3 participants