Skip to content

SDK repo should be more tolerant of upstream deprecations #63975

Open

Description

@natebosch

It can be difficult to roll packages into DEPS when there are new deprecations in library code used within the SDK. We currently disallow new diagnostics which means adding // ignore comments or migrating API usage in the same CL that rolls deps.

Disabling diagnostics for deprecations on CI might mean that no one sees the diagnostics at all until the major version bump and the code getting hard broken.

Activity

  1. added
    area-infrastructureUse area-infrastructure for SDK infrastructure issues, like continuous integration bot changes.
    on Aug 19, 2026
  2. lrhn commented on Aug 19, 2026

    @lrhn
    Member

    Deprecations should never be breaking. That's the entire point of deprecating, to warn before actually breaking.

    It would be nice if we had some tool that recognizes new warnings, logs them, surfaces them in some useful place (maybe a test-configuration where they are occur as new failing tests, so you can file issues and accept those failures), and maybe even turn warnings into errors if they are not fixed within <reasonable time> (configurable!)

    But it's never OK to block someone from releasing a deprecation. You want deprecations to be released as early as possible.

  3. natebosch commented on Sep 1, 2026

    @natebosch
    MemberAuthor

    Similarly we might need to allow some tolerance for #invalid_use_of_internal_member diagnostics.

  4. lrhn commented on Sep 1, 2026

    @lrhn
    Member

    #invalid_use_of_internal_member

    Sounds more like an actual problem.

    Using a member that's not intended to be used, whether @internal or @visibleForTest, is an actual error, not a warning.
    Adding such annotations should be considered a breaking change analogous to removing the member. (Because renaming such a member is not a breaking change.)

    Unless the "shouldn't use this member" was documented before, just not enforced with an annotation. Then adding the annotation should not be considered breaking, since there should be no usages. Ignoring documented intended use is a bug at the usage site, whether it's caught or not.

    (As usual, if the person adding the annotation is working for the same company that gets the error, they might have to fix it anyway, or delay publishing the annotation until the error has been fixed. But that's an internal company decision, not what anybody else should do.)

  5. natebosch commented on Sep 1, 2026

    @natebosch
    MemberAuthor

    SGTM. I'm happy to say that in this situation the author should consider adding the annotation as technically breaking, but potentially allowed in a minor version bump based on specifics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infrastructureUse area-infrastructure for SDK infrastructure issues, like continuous integration bot changes.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions