fix: resolve @codemirror/lsp-client from git submodule - #2901
RohitKushvaha01 wants to merge 1 commit into
Conversation
npm refuses to fetch git dependencies (EALLOWGIT), which made `npm run setup` fail before installing any dependency. The dependency now points at the local codemirror-lsp-client submodule, pinned to the same commit the git ref used. - setup initializes the submodule before installing dependencies - CI checkout steps that install or build fetch submodules recursively - rspack treats the submodule's prebuilt dist as a dependency, not as first-party source - docs clone with --recurse-submodules and note the setup fallback
|
| // Not a git checkout (e.g. source archive) but the sources are already | ||
| // there, so the local "file:" dependency can still be installed. | ||
| if (fs.existsSync(path.join(submodulePath, "package.json"))) { | ||
| console.warn( | ||
| `Failed to update git submodules. Using the existing ${LSP_CLIENT_DIR} checkout.`, | ||
| ); | ||
| return; | ||
| } | ||
|
|
||
| throw new Error( | ||
| `Unable to initialize the ${LSP_CLIENT_DIR} submodule. Run "git submodule update --init --recursive" manually and try again.`, | ||
| { cause: error }, | ||
| ); |
There was a problem hiding this comment.
Standard source archives do not include checked-out Git submodule contents. In that situation, the Git command fails, codemirror-lsp-client/package.json is absent, and setup throws before installing dependencies. This breaks archive-based setup, which previously fetched the Git dependency during installation, even though this fallback explicitly accounts for source archives.
|
For this, The fix will occur in next release on F-droid. |
This is a Fix for
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/48774