Skip to content

Conversation

@swankjesse
Copy link
Collaborator

No description provided.

@swankjesse
Copy link
Collaborator Author

I’ve added @file:MustUseReturnValue to every file in the public API. (Can I do this at the module level?)

And I’ve added @IgnorableReturnValue to every function that fits. I was pretty generous with these and put them on all the overrides and expect/actuals.

I haven’t done Okio-internals for us to take advantage of this capability internally! We can do that later, with a bit less urgency.

@swankjesse
Copy link
Collaborator Author

Ooooh I can save myself a lot of boilerplate with this:

kotlin {
    compilerOptions {
        freeCompilerArgs.add("-Xreturn-value-checker=full")
    }
}

Will do.

@swankjesse
Copy link
Collaborator Author

swankjesse commented Nov 6, 2025

  • Don’t merge this ’til we’re on Kotlin 2.3.0, since the annotations themselves are changing.

@swankjesse swankjesse marked this pull request as draft November 6, 2025 15:16
@JakeWharton
Copy link
Collaborator

I think this might end up being at odds with #1690.

Also not sure what implications it has, but the annotation has been renamed in Kotlin 2.3.0 to be plural.

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