You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SDK repo should be more tolerant of upstream deprecations #63975
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.
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.
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.)
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.
Activity
lrhn commentedon Aug 19, 2026
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.
natebosch commentedon Sep 1, 2026
Similarly we might need to allow some tolerance for
#invalid_use_of_internal_memberdiagnostics.lrhn commentedon Sep 1, 2026
Sounds more like an actual problem.
Using a member that's not intended to be used, whether
@internalor@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.)
natebosch commentedon Sep 1, 2026
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.