Skip to content

Experiment: integrate shared package as a git submodule#696

Merged
edvilme merged 5 commits into
shared-package-syncfrom
shared-package-submodule
Jul 1, 2026
Merged

Experiment: integrate shared package as a git submodule#696
edvilme merged 5 commits into
shared-package-syncfrom
shared-package-submodule

Conversation

@edvilme

@edvilme edvilme commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Experiment: integrate the shared package as a git submodule instead of an external published dependency.

This PR targets shared-package-sync so the diff isolates the submodule conversion on top of that branch.

Changes

  • Add external/vscode-common-python-lsp as a git submodule, pinned to v0.8.0.
  • package.json: @vscode/common-python-lsp -> file:external/vscode-common-python-lsp/typescript.
  • noxfile.py: bundle the Python lib from ./external/vscode-common-python-lsp/python (--no-deps).
  • requirements.in / requirements.txt: drop the vscode-common-python-lsp pin and hash block (now sourced from the submodule).
  • Replace shared-package-release.yml (version bump) with shared-package-submodule-sync.yml (bumps the submodule commit to the released tag, pushes a branch, opens a tracking issue with a manual-PR link).

Notes / caveats

  • CI must check out submodules (submodules: recursive) and build the TS submodule (dist/) before packaging — the file: install does not run a prepare build.
  • --generate-hashes cannot hash a local path, so the shared Python lib is intentionally out of the hashed lockfile and installed via the submodule.

Replaces the external @vscode/common-python-lsp / vscode-common-python-lsp
dependency with a git submodule at external/vscode-common-python-lsp (pinned
to v0.8.0). npm consumes it via a file: reference, the Python lib is bundled
from the submodule, and the release pipeline now bumps the submodule commit
instead of a version pin.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme added the debt Code quality issues label Jun 30, 2026
edvilme and others added 4 commits June 30, 2026 22:50
- Build the shared package TypeScript dist via a postinstall hook so the
  bundler and type-checker can resolve the file: dependency.
- Regenerate package-lock.json to record the file: link and the submodule
  dependency tree.
- Exclude external/ from the extension tsconfig so the submodule sources are
  not type-checked against the extension rootDir.
- Check out submodules (recursive) in PR and push CI so the submodule and its
  Python library are present for npm and nox.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Exclude external/ from the VSIX (.vscodeignore) since webpack already
  bundles the shared package; avoids case-insensitive path collisions from
  the submodule node_modules.
- Add skipLibCheck to tsconfig where missing so hoisted submodule devDep
  type definitions do not fail the extension type-check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The 1ES/DevDiv checkout template does not initialize submodules, so add an
explicit git submodule update --init --recursive step before npm ci and nox
in the validation, stable, and pre-release pipelines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The tests job checks out into a working directory with spaces and unicode
(the special-working-directory path), which breaks actions/checkout submodule
initialization. Check out without submodules there and run git submodule
update --init --recursive as a separate step instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme marked this pull request as ready for review July 1, 2026 21:48
@edvilme edvilme merged commit d1f2a44 into shared-package-sync Jul 1, 2026
27 of 30 checks passed
@edvilme edvilme deleted the shared-package-submodule branch July 1, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant