Skip to content

fix: rename stale artifactLocation call to sessionArtifactLocation (build fix for vscode-engineering#3671) - #331997

Draft
VS Code PR Bot (vscodebot-pr) wants to merge 2 commits into
microsoft:mainfrom
vscodebot-pr:fix/session-artifact-location-3671-aw-32502132894
Draft

fix: rename stale artifactLocation call to sessionArtifactLocation (build fix for vscode-engineering#3671)#331997
VS Code PR Bot (vscodebot-pr) wants to merge 2 commits into
microsoft:mainfrom
vscodebot-pr:fix/session-artifact-location-3671-aw-32502132894

Conversation

@vscodebot-pr

Copy link
Copy Markdown

Build failure

Compile failed on every platform with a TypeScript error:

src/vs/sessions/contrib/chat/browser/sessionArtifacts.ts(187,10): error TS2304: Cannot find name 'artifactLocation'.

Because no build output was produced, all downstream test, crash-report publishing, and non-production verification jobs cascaded into failure.

Root cause

The helper function artifactLocation was renamed to export function sessionArtifactLocation in sessionArtifacts.ts. Every call site was updated except the one at line 187 (inside the images section of buildSessionArtifactSections), which still referenced the now-nonexistent artifactLocation, producing TS2304. The function is defined at line 74 and correctly used at lines 96, 113, 121, 128, and 172 — line 187 was the sole straggler.

How the fix works

Renames the remaining artifactLocation(uri, label) call at line 187 to sessionArtifactLocation(uri, label), matching the function's actual exported name. The signature and behavior are identical, so the spread of ariaDescription/ariaLabel/hover/tooltip into the image pill entry now resolves correctly and the file type-checks.

Rollback evaluation

  • Recommendation: Do not roll back.
  • Culprit: not confirmed from public source alone (the rename was introduced by the commit that renamed artifactLocationsessionArtifactLocation in this file).
  • Rationale: Impact is broad (blocks all main CI), but the fix-forward is an unambiguous one-line rename that lands faster and more safely than reverting a commit that also carries unrelated changes.
  • Owners to consult: @benibenj

Validation

Verified by source inspection: sessionArtifactLocation is the only definition (line 74) and artifactLocation no longer appears anywhere in the file after the change. A full tsgo/typecheck build was not run in this environment; the change is a mechanical identifier rename matching the existing exported symbol.

Risk

Minimal. Single-line identifier rename to an existing function with an identical signature; no behavioral change.

Recommended reviewer

Recommended owner: @benibenj

Fixes microsoft/vscode-engineering#3671

Generated by build-fix · opus48 · 77.7 AIC · ⌖ 11.9 AIC · ⊞ 11.6K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes a TypeScript build failure caused by a stale function reference.

Changes:

  • Replaces artifactLocation with the existing sessionArtifactLocation helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great catch on this edge case. Fallback logic is robust.

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

Labels

vscode-build VS Code build process issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants