---
title: "Check a deprecation claim against the version you actually pin | Proofline"
description: "A comment saying an API is deprecated is a claim about one release of one library. Read that release's source or changelog before you act."
url: https://proofline.sh/learn/ai-review-deprecated-api-comment/
---

[Learning center](/learn/)

# Check a deprecation claim against the version you actually pin

A comment saying an API is deprecated is a claim about one release of one library. Read that release's source or changelog before you act. If the symbol is not deprecated there, dismiss the comment and link the line. If it is, migrate when the replacement exists at the oldest version you support. If the replacement is newer than that floor, suppress the warning at the call site and record when to migrate.

Code review The Proofline team November 22, 2026 5 min read

## Look where the library declares it

Deprecation is declared in code, so the most direct evidence is the declaration at the version your lockfile or toolchain file names. Most ecosystems mark it in a way you can search for:

| Ecosystem | Where the mark lives | What it records |
| --- | --- | --- |
| Rust | A [`#[deprecated(since = ..., note = ...)]`](https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-deprecated-attribute) attribute on the item | The release that deprecates it, and often the replacement |
| Dart and Flutter | An `@Deprecated('...')` annotation | A message, which in Flutter names the release after which the API was deprecated |
| Python | A [`DeprecationWarning`](https://docs.python.org/3/library/exceptions.html#DeprecationWarning) raised by the function, and the library's changelog | The version, in the changelog or the documentation's "Deprecated since" note |
| npm packages | [`npm deprecate`](https://docs.npmjs.com/cli/commands/npm-deprecate) on a published version, or a JSDoc `@deprecated` tag | Package-level or symbol-level notices |

Two errors are worth checking for. The comment names something that is not deprecated, often a neighbor of something that is. Or it names the wrong release, so the advice to migrate assumes a replacement your supported versions do not have.

## A deprecation that was not there

In October 2026, a Flutter pull request added WebDriver pointer actions to `package:integration_test` on the web. Its code looked up the view with `PlatformDispatcher.instance.implicitView`. Gemini Code Assist's review summary said the feedback "suggests replacing deprecated usages of `PlatformDispatcher.implicitView`" "with non-deprecated alternatives in both the test driver and the core integration test package." [Review](https://github.com/flutter/flutter/pull/195207#pullrequestreview-5636339895)

The inline threads are marked resolved, and GitHub hides their text, so I cannot quote the replies. The outcome is in the code. The pull request merged on 29 October 2026, and the merged diff adds `ui.PlatformDispatcher.instance.implicitView!.viewId` to the integration test and `view ?? platformDispatcher.implicitView` to the package. [Pull request](https://github.com/flutter/flutter/pull/195207)

To check the claim, read `dart:ui` at the merge commit. In `lib/ui/platform_dispatcher.dart`, the `implicitView` getter has no `@Deprecated` annotation. Its documentation warns that applications "must not rely on this property being set as it may be null depending on the engine's configuration", which is a reason to handle `null` and not a deprecation. The deprecated API is next door: in `lib/ui/window.dart`, the top-level `window` singleton carries `@Deprecated` with the message "This feature was deprecated after v3.7.0-32.0.pre." [platform\_dispatcher.dart](https://github.com/flutter/flutter/blob/9e619e1c02c36f53bdfb78c230ec7c5343825d5c/engine/src/flutter/lib/ui/platform_dispatcher.dart) [window.dart](https://github.com/flutter/flutter/blob/9e619e1c02c36f53bdfb78c230ec7c5343825d5c/engine/src/flutter/lib/ui/window.dart)

So the comment deserved a dismissal, and the best dismissal links the getter's declaration at the pinned commit. A reply like that takes one search, and it saves the next reader from asking the same question.

## A deprecation that was real, with a replacement too new

The opposite case came from the compiler itself. When googleapis/google-cloud-rust moved its stable toolchain from Rust 1.98 to 1.99 in October 2026, the description explained: "Rust 1.99 deprecates Atomic\*::fetch\_update in favor of try\_update", which fails clippy under `--deny warnings`. The obvious fix would not build for every supported user: "try\_update was only stabilized in 1.95, which is newer than our MSRV", which the description gives as 1.91. [Description](https://github.com/googleapis/google-cloud-rust/pull/7109#issue-5716598217)

The standard library's source confirms both versions. At the `1.99.0` tag, `fetch_update` carries ``#[deprecated(since = "1.99.0", note = "renamed to `try_update` for consistency", suggestion = "try_update")]``, and `try_update` is marked `#[stable(feature = "atomic_try_update", since = "1.95.0")]`. At the `1.91.0` tag, `try_update` exists but is marked `#[unstable(...)]`, so stable 1.91 cannot call it. [atomic.rs at 1.99.0](https://github.com/rust-lang/rust/blob/1.99.0/library/core/src/sync/atomic.rs) The same attribute already appears in the source at the `1.95.0` tag. Its `since` field, not the first release that contains the attribute, names the release that deprecates the method, and the pull request's description ties the clippy failure to the 1.99 toolchain.

The authors kept `fetch_update`, suppressed the warning with `#[allow(deprecated)]` at each call site, and added ``// TODO(#7108): use `try_update` once the MSRV is bumped to 1.95.`` Gemini Code Assist's review then said "The review feedback suggests scoping the `#[allow(deprecated)]` attribute directly to the expression" in `token_bucket.rs` "rather than the entire function". [Review](https://github.com/googleapis/google-cloud-rust/pull/7109#pullrequestreview-5418541773) The author applied it in a commit titled "chore: address review feedback", which moved the attribute from `try_acquire` onto its calling statement, and the pull request merged on 7 October 2026.

Here a deprecation was real and migrating was still wrong, because the replacement was newer than the oldest toolchain the project supports. The bot's narrower comment, which kept the suppression from hiding other deprecations in the function, deserved its change.

## Decide from three facts

For any deprecation comment, write down three facts before replying:

1.  Is the symbol deprecated in the version you pin? Read the declaration or changelog at that version, not at the library's latest release.
2.  In which release does the replacement first exist, and is that at or below your supported floor: the minimum Rust version, the oldest Python in your test matrix, the lowest version your package range allows?
3.  Does the warning fail a build you run, such as clippy with `-D warnings` or Python with `-W error`? If it does, the third row below cannot wait for a follow-up.

| Facts | Decision |
| --- | --- |
| Not deprecated at the pinned version | Dismiss, linking the declaration |
| Deprecated, replacement available at your floor | Change: migrate, and let existing tests cover the new call |
| Deprecated, replacement newer than your floor | Suppress at the narrowest scope so the build passes, and open an issue tied to raising the floor |
| Deprecated only in a release you do not use yet | Dismiss for now, and note it for the upgrade that brings it |

When the bot also proposes the replacement, check that the replacement exists at your floor, as [the guide to suggested APIs](/learn/ai-review-nonexistent-api-suggestion/) describes. If the bot repeats the deprecation comment on the next push after you answered it, the [follow-through guide](/learn/review-finding-follow-through/) shows how to count that cost.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Run a suggested API on the oldest version you support](/learn/ai-review-nonexistent-api-suggestion/)
    
    Code review The Proofline team November 22, 2026 4 min read
    
-   ### [Settle a dependency comment from the registry and your support policy](/learn/ai-review-dependency-version-comment/)
    
    Code review The Proofline team November 22, 2026 4 min read
