Skip to content

Correct stale deprecation versions in API comments#9290

Open
hl662 wants to merge 3 commits into
masterfrom
nam/fix-stale-5-1-9-deprecations
Open

Correct stale deprecation versions in API comments#9290
hl662 wants to merge 3 commits into
masterfrom
nam/fix-stale-5-1-9-deprecations

Conversation

@hl662
Copy link
Copy Markdown
Contributor

@hl662 hl662 commented May 12, 2026

Closes #9287

Why

Some deprecated API comments are still stamped as @deprecated in 5.1.9 even when the replacement API was introduced later in 5.5.0 or 5.9.0. That leaves users with the wrong migration timeline in editor warnings and generated docs, and it makes the deprecation metadata inconsistent with the actual history we already traced.

This PR manually corrects the already-triaged stale comments so the published deprecation guidance matches the release where those APIs were actually deprecated. It is intentionally separate from the pipeline fix that restores version syncing for future deprecation rewrites.

What

Asset Why it exists
core/backend deprecation comment updates Most stale 5.1.9 deprecations live here, so these edits realign backend API comments with the actual 5.9.0 deprecation wave and its existing removal-date buckets.
core/common and core/frontend deprecation comment updates These comments pointed to replacement APIs introduced later than 5.1.9, so they now match the same 5.9.0 migration timeline as the backend APIs they pair with.
domains/linear-referencing/backend deprecation comment updates The linear-referencing editing APIs were part of the same later deprecation wave, so their comments now point to the correct 5.9.0 version.
core/geometry deprecation comment updates These two geometry deprecations were introduced in 5.5.0, so they need a separate version correction instead of being lumped into the 5.9.0 bucket.

No runtime behavior changed; this is a comment-only cleanup of stale deprecation metadata across 28 files.

Validation

  • node common/scripts/install-run-rush.js install --bypass-policy
  • node common/scripts/install-run-rush.js build --to @itwin/core-backend --to @itwin/core-common --to @itwin/core-frontend --to @itwin/core-geometry --to @itwin/linear-referencing-backend
  • cd core/geometry && node ../../common/scripts/install-run-rushx.js docs
  • cd core/common && node ../../common/scripts/install-run-rushx.js docs
  • cd core/backend && node ../../common/scripts/install-run-rushx.js docs
  • cd core/frontend && node ../../common/scripts/install-run-rushx.js docs
  • cd domains/linear-referencing/backend && node ../../../common/scripts/install-run-rushx.js docs
  • node common/scripts/install-run-rush.js extract-api --to @itwin/core-backend --to @itwin/core-common --to @itwin/core-frontend --to @itwin/core-geometry --to @itwin/linear-referencing-backend
  • rg -n "@deprecated in 5\.1\.9" core presentation domains editor extensions tools ui utils full-stack-tests common → no matches in the targeted source roots after the cleanup

Nambot 🤖 (powered by gpt-5.4)

@hl662 hl662 force-pushed the nam/fix-stale-5-1-9-deprecations branch from b790d06 to c7a4d63 Compare May 12, 2026 20:50
Copy link
Copy Markdown
Member

@dassaf4 dassaf4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core-geometry looks good, thanks.

@aruniverse
Copy link
Copy Markdown
Member

are there any other incorrect deprecated in version comments than just the ones in here?

@dassaf4
Copy link
Copy Markdown
Member

dassaf4 commented May 13, 2026

What's the best practice for inserting the right deprecation version? Or is this automatic going forward?

@hl662
Copy link
Copy Markdown
Contributor Author

hl662 commented May 13, 2026

are there any other incorrect deprecated in version comments than just the ones in here?

We've fixed all the currently-audited stale incorrect deprecation-version comments attributable to the 5.1.9 hardcoded policy problem. If there are any other incorrect deprecated version comments, that would come from human error, manually written deprecation comments disclosing which major/minor/patch versions are not affected by this problem - in that case, that should be part of a different PR if we had any remaining, but that'll be more fine combing through the repo

@hl662
Copy link
Copy Markdown
Contributor Author

hl662 commented May 13, 2026

What's the best practice for inserting the right deprecation version? Or is this automatic going forward?

I would defer to my senior colleagues to answer, I'm sure knowing what could happen I will be manually stamping which version I deprecate my apis 😃

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.

Deprecation automation is still stamping @deprecated in 5.1.9 onto APIs first deprecated in later minors

4 participants