Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use env extension when available #24564

Merged
merged 14 commits into from
Dec 10, 2024
Merged

Use env extension when available #24564

merged 14 commits into from
Dec 10, 2024

Conversation

karthiknadig
Copy link
Member

No description provided.

@karthiknadig karthiknadig added the feature-request Request for new features or functionality label Dec 9, 2024
@karthiknadig karthiknadig added this to the January 2025 milestone Dec 9, 2024
@karthiknadig karthiknadig self-assigned this Dec 9, 2024
@karthiknadig karthiknadig marked this pull request as ready for review December 10, 2024 06:21
hideFromUser: this.options?.hideFromUser,
});
} else {
this.terminalShellType = this.terminalHelper.identifyTerminalShell(this.terminal);

Choose a reason for hiding this comment

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

this isn't 100% accurate in terms of always getting the shell type right, correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not, this is the same detector as the one Python extension uses. We need the shell type API to be more accurate.

});
this.terminalAutoActivator.disableAutoActivation(this.terminal);

await sleep(100);

Choose a reason for hiding this comment

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

is there reason why we wait for short duration before activateEnvironmentInTerminal

Copy link
Member Author

Choose a reason for hiding this comment

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

This is also from the existing activation. This is to give shell initialization enough time to start.


if (pythonEnv && project) {
const fixedOptions = options ? { ...options } : { cwd: project.uri };
const terminal = await api.createTerminal(pythonEnv, fixedOptions);

Choose a reason for hiding this comment

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

it seems like this is calling createTerminal from env extension API, Im trying to understand why this and the interpreter one are both called "legacy"

Copy link
Member Author

Choose a reason for hiding this comment

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

Because it is temporary solution to the old features in the Python extension. These apis can be deleted when we delete the code for old Python features.

@karthiknadig karthiknadig merged commit e789348 into main Dec 10, 2024
99 checks passed
@karthiknadig karthiknadig deleted the env-ext1 branch December 10, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants