-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
shadows/framework/src/main/java/org/robolectric/shadows/ShadowActivityManager.java
Outdated
Show resolved
Hide resolved
@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. |
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.
Can you create a new annotation called @ClassName
that is in the Robolectric annotations project? Same directory as @Implementation
. That should be used instead
d3d44de
to
4c6d701
Compare
Created a ClassName annotation, almost same as existing WithType annotation. |
@Mia0451 squash to one commit and use ClassName to replace WithType for your changes. |
This looks great! Can you squash the commits and then I can merge? |
Hello utzcoz@ and hoisie@, |
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.
np. LGTM.
@Mia0451 You need fix code style and commit message checking. |
@Mia0451 The issue still exist. I think you need to learn what these tasks by checking Robolectric's workflow files. |
got you, reading the error msg now. |
@Mia0451 each commit message has to have the following structure:
So in this example, the commit message could be something liek
See https://github.com/robolectric/robolectric/blob/master/.github/workflows/validate_commit_message.yml |
7a4bf41
to
6be2689
Compare
@Mia0451 https://github.com/robolectric/robolectric/wiki/Robolectric's-code-style format your code locally before pushing. |
@Mia0451 Also some line in commit message is too long. |
This annotation will be used to specify parameter types of shadow methods. The eventual goal is to use this to replace `looseSignatures`.
…nch. The original commit was by Wenyi Shi. New commits in the google branch in ShadowDisplayManagerGlobal breaks gradle tests due to referencing classes like VirtualDisplayConfig in delegating proxies that only exist in android 34+. A mechanism like ClassName would be ideal to resolve these conflicts. This dupe commit will be removed during the next `google` -> `master` merge. See #9063. PiperOrigin-RevId: 641041414
…nch. The original commit was by Wenyi Shi. New commits in the google branch in ShadowDisplayManagerGlobal breaks gradle tests due to referencing classes like VirtualDisplayConfig in delegating proxies that only exist in android 34+. A mechanism like ClassName would be ideal to resolve these conflicts. This dupe commit will be removed during the next `google` -> `master` merge. See #9063. PiperOrigin-RevId: 641045787
Add a new ClassName annotation
This annotation will be used to specify parameter types of shadow methods. The eventual goal is to use this to replace
looseSignatures
.