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

chore: remove redundant '@JvmStatic' annotations #12317

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

david-allison
Copy link
Member

@david-allison david-allison commented Sep 5, 2022

We're no longer in Java, so only a few annotations are still necessary.

These are mostly test methods (@Parameters/@MethodSource), a few which are useful for mocks, and a small number which cause tests to fail if they're removed for no reasonable reason

This is a potentially flaky commit, hopefully the reduction in code causes a reduction in compile times which makes this worthwhile

This was a mostly automated process, adding comments manually if removing the annotation failed tests

It did not modify the API project public classes

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@lukstbit lukstbit added Needs Author Reply Waiting for a reply from the original author Needs Review labels Sep 5, 2022
@david-allison david-allison removed the Needs Author Reply Waiting for a reply from the original author label Sep 5, 2022
We're no longer in Java, so only a few annotations are still necessary.

These are mostly test methods (`@Parameters/@MethodSource`),
a few which are useful for mocks, and a small number which cause tests
to fail if they're removed for no reasonable reason

This is a potentially flaky commit, hopefully the reduction in
code causes a reduction in compile times

This was a mostly automated process, adding comments manually
if removing the annotation failed tests

It did not modify the API project public classes
Copy link
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

LGTM

@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Sep 5, 2022
Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

AnkiStatsTaskHandlerTest > testCreateReviewSummaryStatistics FAILED
    kotlinx.coroutines.test.UncompletedCoroutinesError: After waiting for 60000 ms, the test coroutine is not completing
        at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$3$3.invokeSuspend(TestBuilders.kt:342)
        (Coroutine boundary)
        at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTestCoroutine(TestBuilders.kt:326)
        at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$1$1.invokeSuspend(TestBuilders.kt:167)
        at kotlinx.coroutines.test.TestBuildersJvmKt$createTestResult$1.invokeSuspend(TestBuildersJvm.kt:13)

        Caused by:
        kotlinx.coroutines.test.UncompletedCoroutinesError: After waiting for 60000 ms, the test coroutine is not completing
            at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$3$3.invokeSuspend(TestBuilders.kt:342)
            at app//kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
            at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
            at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
            at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
            at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
            at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
            at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
            at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
            at kotlinx.coroutines.test.TestBuildersJvmKt.createTestResult(TestBuildersJvm.kt:12)
            at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest(TestBuilders.kt:166)
            at kotlinx.coroutines.test.TestBuildersKt.runTest(Unknown Source)
            at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest(TestBuilders.kt:154)
            at kotlinx.coroutines.test.TestBuildersKt.runTest(Unknown Source)

🤔 ?

(locally - target testPlayDebugUnitTest)

@david-allison
Copy link
Member Author

david-allison commented Sep 6, 2022

Flaky (with a potentially pending fix): #11091 (comment)

@mikehardy mikehardy merged commit 3e07d87 into ankidroid:main Sep 6, 2022
@github-actions github-actions bot added this to the 2.16 release milestone Sep 6, 2022
@github-actions github-actions bot removed the Needs Second Approval Has one approval, one more approval to merge label Sep 6, 2022
@david-allison david-allison deleted the remove-JvmStatic branch September 6, 2022 13:23
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.

3 participants