Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive

- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
Expand All @@ -73,6 +75,8 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
with:
fetch-depth: 0 # Required for tags
persist-credentials: false
submodules: recursive
ref: ${{ (inputs.is_PR && inputs.PR_NUMBER) && github.event.pull_request.head.sha || '' }}
allow-unsafe-pr-checkout: ${{ !!(inputs.is_PR && inputs.PR_NUMBER && github.event.pull_request.head.sha) }}

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "codemirror-lsp-client"]
path = codemirror-lsp-client
url = https://github.com/Acode-Foundation/codemirror-lsp-client
43 changes: 40 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Thank you for your interest in contributing to Acode! This guide will help you g

2. Clone and open the repository:
```bash
git clone https://github.com/Acode-Foundation/Acode.git
git clone --recurse-submodules https://github.com/Acode-Foundation/Acode.git
code Acode
```

Expand All @@ -35,7 +35,7 @@ If your editor doesn't support DevContainers, you can use Docker directly:

```bash
# Clone the repository
git clone https://github.com/Acode-Foundation/Acode.git
git clone --recurse-submodules https://github.com/Acode-Foundation/Acode.git
cd Acode

# Build the Docker image from our Dockerfile
Expand Down Expand Up @@ -109,7 +109,7 @@ Some more environment variables, check [cordova docs](https://cordova.apache.org

```bash
# Clone the repository
git clone https://github.com/Acode-Foundation/Acode.git
git clone --recurse-submodules https://github.com/Acode-Foundation/Acode.git
cd Acode

# Install dependencies and set up Cordova
Expand All @@ -121,6 +121,43 @@ pnpm run build paid dev apk # or pnpm run build p d

The APK will be at: `platforms/android/app/build/outputs/apk/debug/app-debug.apk`

> [!NOTE]
> `@codemirror/lsp-client` comes from the `codemirror-lsp-client` git submodule and is installed as a local `file:` dependency, so the submodule must be cloned before `setup` runs. If it isn't, `setup` stops with a missing-submodules error — see [Troubleshooting](#-troubleshooting).

## 🔧 Troubleshooting

### `setup` fails: submodules are not checked out

`@codemirror/lsp-client` is not fetched from a registry. It comes from the
[`codemirror-lsp-client`](https://github.com/Acode-Foundation/codemirror-lsp-client)
git submodule and is installed as a local `file:` dependency.

Before installing dependencies, `pnpm run setup` reads `.gitmodules` and verifies that
every submodule it declares has actually been cloned — a directory only counts as cloned
when it contains at least one non-hidden file. An empty, missing, or partial checkout (for
example one holding only `.git` or `node_modules`) therefore stops setup with:

```
The following submodule(s) are not checked out (empty or absent):
```

To fix it, initialize the submodules from the repository root and re-run setup:

```bash
git submodule update --init --recursive
pnpm run setup
```

This usually means the repository was cloned without `--recurse-submodules`. Cloning with
submodules avoids the problem entirely:

```bash
git clone --recurse-submodules https://github.com/Acode-Foundation/Acode.git
```

> [!NOTE]
> The check is skipped when `.gitmodules` is absent (for example an unpacked source
> archive) or declares no submodules, so those setups are unaffected.

## 📝 Contribution Guidelines

Expand Down
1 change: 1 addition & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ check-filename = true
[files]
extend-exclude = [
"node_modules",
"codemirror-lsp-client",
"www",
"*.yaml",
".vscode",
Expand Down
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions codemirror-lsp-client
Submodule codemirror-lsp-client added at db6930
Loading
Loading