Skip to content

Allow package manager to fully control install/uninstall steps#105

Merged
karthiknadig merged 5 commits intomicrosoft:mainfrom
karthiknadig:custom-steps1
Jan 9, 2025
Merged

Allow package manager to fully control install/uninstall steps#105
karthiknadig merged 5 commits intomicrosoft:mainfrom
karthiknadig:custom-steps1

Conversation

@karthiknadig
Copy link
Member

Closes #99

@karthiknadig karthiknadig self-assigned this Jan 7, 2025
@karthiknadig karthiknadig requested a review from Copilot January 9, 2025 16:47
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.

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

Files not reviewed (9)
  • .vscode/settings.json: Language not supported
  • examples/sample1/src/api.ts: Evaluated as low risk
  • src/internal.api.ts: Evaluated as low risk
  • src/common/localize.ts: Evaluated as low risk
  • src/common/pickers/packages.ts: Evaluated as low risk
  • src/api.ts: Evaluated as low risk
  • src/managers/builtin/venvUtils.ts: Evaluated as low risk
  • src/features/envCommands.ts: Evaluated as low risk
  • src/managers/conda/condaPackageManager.ts: Evaluated as low risk
Comments suppressed due to low confidence (5)

src/managers/common/pickers.ts:21

  • [nitpick] The Installable interface has both name and displayName properties, which might be confusing. Consider renaming name to something more specific, like id.
export interface Installable {

src/managers/builtin/pipManager.ts:52

  • Ensure that the new behavior of prompting the user to select packages when none are provided is covered by tests.
async install(environment: PythonEnvironment, packages?: string[], options?: PackageInstallOptions): Promise<void> {

src/managers/builtin/pipManager.ts:91

  • Ensure that the new behavior of prompting the user to select packages when none are provided is covered by tests.
async uninstall(environment: PythonEnvironment, packages?: Package[] | string[]): Promise<void> {

src/managers/conda/condaUtils.ts:26

  • The runConda function should handle errors when parsing JSON and provide a clear error message if parsing fails.
return JSON.parse(raw);

src/managers/conda/condaUtils.ts:694

  • [nitpick] Ensure that the description field is consistently used across the codebase and correctly populated in the selectFromCommonPackagesToInstall function.
description: p.description,

@karthiknadig
Copy link
Member Author

@jjjermiah This should allow you to fully control the install/uninstall experience. I have removed the installable API. Instead, I directly call into the install or uninstall methods. This allows extension authors to fully manage the experience.

@karthiknadig karthiknadig marked this pull request as ready for review January 9, 2025 16:59
@karthiknadig karthiknadig enabled auto-merge (squash) January 9, 2025 16:59
@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Jan 9, 2025
@karthiknadig karthiknadig merged commit 0ec3e94 into microsoft:main Jan 9, 2025
6 checks passed
@karthiknadig karthiknadig deleted the custom-steps1 branch January 9, 2025 18:45
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.

Allow installable to return custom steps

3 participants