Skip to content

Conversation

@karthiknadig
Copy link
Member

@karthiknadig karthiknadig commented Apr 10, 2025

Fixes #223

@karthiknadig karthiknadig self-assigned this Apr 10, 2025
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Apr 10, 2025
@karthiknadig karthiknadig marked this pull request as ready for review April 10, 2025 21:15
@karthiknadig karthiknadig enabled auto-merge (squash) April 10, 2025 21:15
@vs-code-engineering
Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically. Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting /AzurePipelines run.

@vs-code-engineering vs-code-engineering bot added this to the April 2025 milestone Apr 10, 2025
@karthiknadig karthiknadig requested a review from Copilot April 11, 2025 00:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with environment manager ID generation by updating error messages and enhancing trace outputs for improved debugging and consistency.

  • Updated error messages in environment managers to provide more context
  • Added trace outputs listing available manager IDs
  • Refined logic in frameUtils to better determine the calling extension ID

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/features/envManagers.ts Updated error messages and added trace outputs for missing managers
src/common/utils/frameUtils.ts Modified frame filtering and error handling in extension detection
Comments suppressed due to low confidence (3)

src/features/envManagers.ts:264

  • [nitpick] Consider standardizing the error message format for missing environment managers so both locations follow a similar pattern for clarity.
`No environment manager found for scope: ${ customScope instanceof Uri ? customScope.fsPath : customScope?.environmentPath?.fsPath }`

src/features/envManagers.ts:302

  • [nitpick] Standardize the error message format here to match the updated pattern used above, ensuring consistent logging across the module.
`No environment manager found for [${environment.envId.managerId}]: ${ environment.environmentPath ? environment.environmentPath.fsPath : '' }`

src/common/utils/frameUtils.ts:70

  • [nitpick] Consider providing a more descriptive error message that indicates which extension is missing, improving debuggability.
if (!envExt || !pythonExt) { throw new Error('Something went wrong with feature registration'); }

@karthiknadig karthiknadig merged commit b275e8b into microsoft:main Apr 11, 2025
6 checks passed
@karthiknadig karthiknadig deleted the fix-ext-id branch April 11, 2025 15:29
NguyenCuong1989 referenced this pull request in NguyenCuong1989/vscode-python-environments Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read properties of undefined (reading 'filePath')

2 participants