Experiment: integrate shared package as a git submodule#696
Merged
Conversation
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>
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Experiment: integrate the shared package as a git submodule instead of an external published dependency.
This PR targets
shared-package-syncso the diff isolates the submodule conversion on top of that branch.Changes
external/vscode-common-python-lspas a git submodule, pinned tov0.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 thevscode-common-python-lsppin and hash block (now sourced from the submodule).shared-package-release.yml(version bump) withshared-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
submodules: recursive) and build the TS submodule (dist/) before packaging — thefile:install does not run apreparebuild.--generate-hashescannot hash a local path, so the shared Python lib is intentionally out of the hashed lockfile and installed via the submodule.