Skip to content

Make okhttp3.internal into internal or turn into API #9435

@vkasprov

Description

@vkasprov

Could you clarify the stance on using code from the okhttp3.internal package?

Is this code truly internal (as the package name suggests) in the sense that...

  • It does NOT belong to the API
  • It CAN be changed without notice between releases
  • OkHttp users should NOT directly reference anything from okhttp3.internal

If the above is true and okhttp3.internal is truly internal, could you please mark all of it with Kotlin internal?

The problem is that currently a lot of okhttp3.internal code is public and OkHttp users CAN reference it, which can then break on update. For example, utilities from the okhttp3.internal.Util.kt disappeared on update from OkHttp 4 to 5. This is especially a problem in big codebases with many engineers.

If there is some okhttp3.internal that needs to be accessed by OkHttp users, it might be a signal that it has to be a proper API instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug in existing code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions