Skip to content

fix: stop excluding dist-info from packaged extension#739

Merged
edvilme merged 2 commits into
mainfrom
fix/keep-dist-info
May 6, 2026
Merged

fix: stop excluding dist-info from packaged extension#739
edvilme merged 2 commits into
mainfrom
fix/keep-dist-info

Conversation

@edvilme
Copy link
Copy Markdown
Contributor

@edvilme edvilme commented May 6, 2026

Problem

Bundled Python packages may use importlib.metadata at runtime to resolve their version string (e.g. isort 8.x uses importlib.metadata.version('isort') in _version.py). This is the modern standard recommended by PEP 566 / PEP 517.

The .vscodeignore has a blanket exclusion �undled/libs/*.dist-info/** that strips all package metadata from the vsix. If any bundled dependency uses importlib.metadata, the LSP server crashes on startup with PackageNotFoundError.

This is currently affecting isort (microsoft/vscode-isort#649) and is a preventive fix for this extension.

Fix

Remove the �undled/libs/*.dist-info/** exclusion. The size impact is negligible (~10-50 KB total) and this future-proofs against any bundled dependency switching to importlib.metadata for versioning.

Remove the blanket `bundled/libs/*.dist-info/**` exclusion from
`.vscodeignore`. Bundled packages may use `importlib.metadata`
at runtime to resolve their version (e.g. isort 8.x), which
requires `.dist-info` directories to be present.

The size impact is negligible (~10-50 KB) and this prevents a
class of startup crashes where the LSP server fails with
`PackageNotFoundError`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme added the debt Technical debt or repo cleanup label May 6, 2026
@edvilme edvilme force-pushed the fix/keep-dist-info branch from 5bb739b to bdbb179 Compare May 6, 2026 19:12
Add a test that calls importlib.metadata.version() against the
bundled libs directory. This ensures .dist-info directories are
present in the packaged extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme force-pushed the fix/keep-dist-info branch from bdbb179 to ca1fd64 Compare May 6, 2026 19:16
@edvilme edvilme merged commit 717106d into main May 6, 2026
21 checks passed
@edvilme edvilme deleted the fix/keep-dist-info branch May 6, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Technical debt or repo cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants