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

Make extension lazy loading optional #22735

Closed
Rafq77 opened this issue Jan 10, 2024 · 1 comment
Closed

Make extension lazy loading optional #22735

Rafq77 opened this issue Jan 10, 2024 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@Rafq77
Copy link

Rafq77 commented Jan 10, 2024

Issue Description

The extension is lazily loaded. That is, looking at package.json:

...
    "activationEvents": [
        "onDebugInitialConfigurations",
        "onLanguage:python",
        "onDebugResolve:python",
        "workspaceContains:mspythonconfig.json",
        "workspaceContains:pyproject.toml",
        "workspaceContains:Pipfile",
        "workspaceContains:setup.py",
        "workspaceContains:requirements.txt",
        "workspaceContains:manage.py",
        "workspaceContains:app.py"
    ],
...

The Python extension is activated when a file which language type is set to Python is currently active or specific files such as: requirements.txt are present in the workspace.

Suggested feature

I'd like to be able to have the extension loaded upon vscode startup onStartupFinished, regardless if the necessary files are present or a python file is active.

In order to not deteriorate loading times for big python projects, I would like to have this feature to be optional, so it could be toggled in the extension settings (disabled by default).

Rationale

We use Python as a helper in our C++ project. We would like the test explorer to discover tests upon vscode startup, which in turn requires the extension to be active. While reopening the project, recent python files remain open in background tabs, switching tabs just to trigger the loading of the extension feels tedious.

@Rafq77 Rafq77 added the feature-request Request for new features or functionality label Jan 10, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 10, 2024
@karthiknadig
Copy link
Member

You may have to use extensions like: https://marketplace.visualstudio.com/items?itemName=mjcrouch.activator to force python extension to activate for you. Unfortunately, there is no way to have both the filter (as you pointed out above) and have it activate always.

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jan 11, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants