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
6 changes: 3 additions & 3 deletions .github/neva-lsp.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Neva LSP is a component release, not a repository-wide Neva Tools release.
NEVA_LSP_REPOSITORY=nevalang/neva-tools
NEVA_LSP_VERSION=lsp/v0.1.5
NEVA_LSP_COMMIT=a15705c46cad9388a17198c2f9adc42c80b0ebbd
NEVA_LSP_CHECKSUMS_SHA256=434959917f58cc7c8725e3a8937a2001cf7ef59a3c6217bf7864e83ad3b711b5
NEVA_LSP_VERSION=lsp/v0.1.6
NEVA_LSP_COMMIT=977fa93a25ca31cd3c98941acd2175cb39e8f84f
NEVA_LSP_CHECKSUMS_SHA256=d37dae7b027fcbfd12359f377eb7b5a82b4d1de53338c6bb6aba1553c8ec5e02
2 changes: 1 addition & 1 deletion .github/scripts/download-neva-lsp-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [[ "$tag_commit" != "$NEVA_LSP_COMMIT" ]]; then
fi

mkdir -p "$OUT_DIR"
gh release download "$NEVA_LSP_VERSION" --repo "$NEVA_LSP_REPOSITORY" --pattern SHA256SUMS --dir "$OUT_DIR"
gh release download "$NEVA_LSP_VERSION" --repo "$NEVA_LSP_REPOSITORY" --pattern SHA256SUMS --pattern LSP-MANIFEST.json --dir "$OUT_DIR"

if [[ "$(sha256sum "$OUT_DIR/SHA256SUMS" | awk '{ print $1 }')" != "$NEVA_LSP_CHECKSUMS_SHA256" ]]; then
echo 'Neva LSP checksum manifest does not match the lock' >&2
Expand Down
54 changes: 26 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,25 @@ jobs:
- name: Checkout extension repository
uses: actions/checkout@v4

- name: Download test-only Neva LSP release
- name: Download locked Neva LSP release
env:
GH_TOKEN: ${{ github.token }}
NEVA_LSP_ASSET_PATTERN: neva-lsp-linux-amd64
run: bash .github/scripts/download-neva-lsp-release.sh .test-tools
run: bash .github/scripts/download-neva-lsp-release.sh bin

- name: Download locked Neva Visual Editor release
env:
GH_TOKEN: ${{ github.token }}
run: bash .github/scripts/download-neva-visual-editor-release.sh dist

- name: Configure system LSP test fixture
- name: Ensure executable bits for unix binaries
run: |
chmod +x .test-tools/neva-lsp-linux-amd64
cat > .test-tools/neva <<'EOF'
#!/usr/bin/env bash
set -euo pipefail
if [[ "${1:-}" != tool || "${2:-}" != lsp ]]; then
echo "Expected: neva tool lsp" >&2
exit 2
fi
shift 2
exec "$(dirname "$0")/neva-lsp-linux-amd64" "$@"
EOF
chmod +x .test-tools/neva
chmod +x bin/neva-lsp-darwin-amd64
chmod +x bin/neva-lsp-darwin-arm64
chmod +x bin/neva-lsp-linux-amd64
chmod +x bin/neva-lsp-linux-arm64

- name: Check packaged LSP binaries
run: npm run check:lsp-binaries

- name: Setup Node
uses: actions/setup-node@v4
Expand All @@ -61,7 +55,7 @@ jobs:
run: npm run build

- name: Run Extension Host integration contract
run: NEVA_TEST_TOOLS_DIR="$PWD/.test-tools" xvfb-run -a npm run test:extension-integration
run: xvfb-run -a npm run test:extension-integration

package-vsix:
name: Package VSIX
Expand All @@ -70,11 +64,26 @@ jobs:
- name: Checkout extension repository
uses: actions/checkout@v4

- name: Download locked Neva LSP release
env:
GH_TOKEN: ${{ github.token }}
run: bash .github/scripts/download-neva-lsp-release.sh bin

- name: Download locked Neva Visual Editor release
env:
GH_TOKEN: ${{ github.token }}
run: bash .github/scripts/download-neva-visual-editor-release.sh dist

- name: Ensure executable bits for unix binaries
run: |
chmod +x bin/neva-lsp-darwin-amd64
chmod +x bin/neva-lsp-darwin-arm64
chmod +x bin/neva-lsp-linux-amd64
chmod +x bin/neva-lsp-linux-arm64

- name: Check packaged LSP binaries
run: npm run check:lsp-binaries

- name: Setup Node
uses: actions/setup-node@v4
with:
Expand All @@ -90,17 +99,6 @@ jobs:
- name: Package VSIX
run: npx vsce package

- name: Assert VSIX contains Visual Mode and no LSP binaries
run: |
if ! unzip -Z1 *.vsix | grep -Fxq 'extension/dist/webview/index.html'; then
echo 'VSIX must bundle the Visual Mode WebView' >&2
exit 1
fi
if unzip -l *.vsix | grep -q 'extension/bin/neva-lsp-'; then
echo 'VSIX must not bundle Neva LSP binaries' >&2
exit 1
fi

- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
Expand Down
48 changes: 12 additions & 36 deletions .github/workflows/release-marketplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,25 @@ jobs:
- name: Checkout vscode-neva
uses: actions/checkout@v4

- name: Download test-only Neva LSP release
- name: Download locked Neva LSP release
env:
GH_TOKEN: ${{ github.token }}
NEVA_LSP_ASSET_PATTERN: neva-lsp-linux-amd64
run: bash .github/scripts/download-neva-lsp-release.sh .test-tools
run: bash .github/scripts/download-neva-lsp-release.sh bin

- name: Download locked Neva Visual Editor release
env:
GH_TOKEN: ${{ github.token }}
run: bash .github/scripts/download-neva-visual-editor-release.sh dist

- name: Configure system LSP test fixture
- name: Ensure executable bits for unix binaries
run: |
chmod +x .test-tools/neva-lsp-linux-amd64
cat > .test-tools/neva <<'EOF'
#!/usr/bin/env bash
set -euo pipefail
if [[ "${1:-}" != tool || "${2:-}" != lsp ]]; then
echo "Expected: neva tool lsp" >&2
exit 2
fi
shift 2
exec "$(dirname "$0")/neva-lsp-linux-amd64" "$@"
EOF
chmod +x .test-tools/neva
chmod +x bin/neva-lsp-darwin-amd64
chmod +x bin/neva-lsp-darwin-arm64
chmod +x bin/neva-lsp-linux-amd64
chmod +x bin/neva-lsp-linux-arm64

- name: Check packaged LSP binaries
run: npm run check:lsp-binaries

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -65,14 +59,7 @@ jobs:
- name: Verify release tag matches package version
if: github.event_name == 'release'
shell: bash
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME#v}"
PKG_VERSION=$(node -p "require('./package.json').version")
if [[ "$TAG" != "$PKG_VERSION" ]]; then
echo "Tag version ($TAG) does not match package.json version ($PKG_VERSION)" >&2
exit 1
fi
run: bash scripts/validate-release-version.sh "$GITHUB_REF_NAME" "${{ github.event.release.name }}"

- name: Install dependencies
run: npm ci
Expand All @@ -81,22 +68,11 @@ jobs:
run: npm run build

- name: Run extension integration smoke tests
run: NEVA_TEST_TOOLS_DIR="$PWD/.test-tools" xvfb-run -a npm run test:integration
run: xvfb-run -a npm run test:integration

- name: Package extension
run: npx -y @vscode/vsce@2.24.0 package -o vscode-nevalang.vsix

- name: Assert VSIX contains Visual Mode and no LSP binaries
run: |
if ! unzip -Z1 vscode-nevalang.vsix | grep -Fxq 'extension/dist/webview/index.html'; then
echo 'VSIX must bundle the Visual Mode WebView' >&2
exit 1
fi
if unzip -l vscode-nevalang.vsix | grep -q 'extension/bin/neva-lsp-'; then
echo 'VSIX must not bundle Neva LSP binaries' >&2
exit 1
fi

- name: Publish to VS Code Marketplace
run: npx -y @vscode/vsce@2.24.0 publish --packagePath vscode-nevalang.vsix -p "$VSCE_PAT"

Expand Down
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.vscode
docs
node_modules
bin
src
syntaxes/tests
syntaxes/neva.tmLanguage.yml
.gitignore
.vscodeignore
webview
neva-tools
tsconfig.json
package-lock.json
14 changes: 5 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Follow these instructions when working in this repository.
1. Use `gh` CLI for GitHub context (issues/PRs). Fall back to web browsing only when `gh` is insufficient.
2. Prefer small, incremental changes. After each feature implementation, report back with what changed and how to verify.
3. Do **not** push to `main` or release a new extension version without explicit approval. Open pull requests ready for review by default; use draft only when there is a stated blocker. CI runs for both states.
4. The Neva compiler lives in `/Users/emil/projects/neva` (read-only). Neva tools live in `nevalang/neva-tools`; `neva-lsp` is a separately installed system tool started through `neva tool lsp`, while `.github/neva-visual-editor.lock` pins the packaged WebView bundle. `neva-view` is not a VS Code dependency.
4. The Neva compiler lives in `/Users/emil/projects/neva` (read-only). Neva tools live in `nevalang/neva-tools`; use `.github/neva-lsp.lock` and `.github/neva-visual-editor.lock` when updating bundled binaries or the visual-editor bundle. `neva-view` is not a VS Code dependency.
5. Assume the current Neva language is `main` (ahead of v0.34); deferred connections are **not** supported and should not be encoded in the extension (syntax highlighting, docs, etc.).
6. Keep the extension compatible with VS Code stable.

Expand All @@ -28,20 +28,16 @@ Follow these instructions when working in this repository.
and the packaged WebView boundary; use the manual smoke checklist for visual
rendering and save-to-refresh on a real workspace.

## 4) LSP System Tool
## 4) LSP Binaries

- LSP release source is `https://github.com/nevalang/neva-tools`, tagged `lsp/vX.Y.Z`.
- Do not package `neva-lsp` binaries in the VSIX. The extension starts the selected system tool with `neva tool lsp`; `neva.lsp.path` is the manual/offline override.
- LSP release source is `https://github.com/nevalang/neva-tools`, tagged `neva-lsp/vX.Y.Z`.
- If updating LSP binaries, update the locked LSP component release; the workflow downloads and verifies all supported OS/arch assets into `bin/`.
- The extension selects a binary by platform/arch in `src/lsp.ts`.

## 5) Release/Publishing Notes

- No publishing or version bumps without explicit approval.
- Open VSX packaging (if needed) should be done explicitly and reviewed.
- If Marketplace publishing cannot be completed deterministically through the
release workflow (for example, a valid secret is unavailable or rejected),
use the `computer-use` skill to upload the already verified VSIX manually in
the official VS Code Marketplace publisher UI. Verify the published version
afterwards; do not treat a failed workflow as a completed release.

## 6) Reference Links

Expand Down
61 changes: 14 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ This is a VScode extension for [Neva](https://github.com/nevalang/neva) - a flow
## Requirements

- [Neva](https://github.com/nevalang/neva) programming language installed
- [Neva LSP](https://github.com/nevalang/neva-tools) installed as a system tool.
Run `Neva: Install Language Tools` from the Command Palette, or follow the
installer instructions in Neva Tools. The extension starts it through
`neva tool lsp`; set `neva.lsp.path` for an offline or custom installation.

## Features

Expand Down Expand Up @@ -60,60 +56,31 @@ The repository includes automated publishing on GitHub Release:

- Workflow: `.github/workflows/release-marketplace.yml`
- Trigger: published GitHub release (or manual `workflow_dispatch`)
- Behavior: packages the shared visual-editor WebView bundle and publishes the
thin extension. `neva-lsp` is installed independently as a system tool;
`neva-view` is not part of this dependency graph.
- Behavior: downloads and verifies separately locked `neva-lsp` binaries and the shared visual-editor WebView bundle, packages extension, and publishes to Marketplace. `neva-view` is not part of this dependency graph.

Required secret in GitHub repository settings:

- `VSCE_PAT` - token with publish rights for publisher `nevalang`

Release flow:

1. Bump `package.json` version (for example `0.7.8`) and commit.
2. Create git tag `v0.7.8` and GitHub Release from that tag.
3. Workflow validates that tag version matches `package.json`, then publishes automatically.
1. Bump `package.json` to plain `MAJOR.MINOR.PATCH` (for example `0.7.17`) and commit.
2. Create the git tag `v0.7.17` and GitHub Release with the exact name `v0.7.17`.
3. Run `bash scripts/validate-release-version.sh v0.7.17 v0.7.17` locally.
4. The workflow validates the naming contract, then publishes automatically.

## Release Notes

### 0.7.16

- Updated the pinned Neva Language Server component to `lsp/v0.1.5`, built
against the published Neva compiler `v0.40.0`.

### 0.7.15

- Updated the Visual Editor bundle to retry its initial program request while
the Language Server is still building the workspace index, instead of
leaving Visual Mode empty.
- Updated the pinned Neva Language Server component to `lsp/v0.1.4`.

### 0.7.14
Release naming is intentionally strict: `vMAJOR.MINOR.PATCH` only. No
prefixes, suffixes, prerelease labels, or build metadata.

- Include the Visual Mode WebView in the packaged VSIX and verify the package
contents in CI, so the Visual Mode panel is available after installation.

### 0.7.13

- When the extension starts the language server directly for a legacy Neva CLI,
offer `Neva: Upgrade CLI` from VS Code. The command opens `neva upgrade` in
an integrated terminal and explains that VS Code needs restarting afterward.

### 0.7.12

- Start an installed `neva-lsp` directly when an older Neva CLI does not yet
support `neva tool lsp`, while explaining that Run still requires a CLI
update.
- Keep one LSP output channel and stop the restart loop for that known legacy
CLI failure.
- Keep Visual Mode as an auxiliary view beside the text editor instead of a
misleading textual/visual toggle.
## Release Notes

### 0.7.11
### 0.7.17

- Stopped bundling all platform `neva-lsp` binaries in the VSIX.
- The extension now starts the installed system tool through `neva tool lsp`.
- Added installation/update commands and the `neva.lsp.path` offline override.
- Restored bundled, checksum-verified Neva LSP binaries so the extension works
immediately after installation without downloading tools at runtime.
- Updated the bundled LSP to `lsp/v0.1.6`, which includes the Neva v0.41.0
formatter.
- Updated the bundled Visual Mode WebView to `visual-editor/v0.1.1`.

### 0.7.10

Expand Down
20 changes: 13 additions & 7 deletions docs/lsp-smoke-checklist.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Neva LSP Smoke Checklist

Use this checklist before publishing a new extension version. The automated Extension Host integration contract is the release gate; this document covers the remaining visual/manual checks.
Use this checklist before publishing a new extension version that bundles updated Neva language-server binaries. The automated Extension Host integration contract is the release gate; this document covers the remaining visual/manual checks.

## 1. Tool resolution check
## 1. Bundle check

1. Install Neva and Neva LSP using their official installers.
2. Confirm `neva tool lsp` starts the installed system LSP.
3. Confirm a manual `neva.lsp.path` override starts the intended binary.
4. Run:
1. Build/copy all expected binaries into `bin/`:
- `neva-lsp-windows-arm64.exe`
- `neva-lsp-windows-amd64.exe`
- `neva-lsp-linux-arm64`
- `neva-lsp-linux-amd64`
- `neva-lsp-linux-loong64`
- `neva-lsp-darwin-arm64`
- `neva-lsp-darwin-amd64`
2. Run:

```bash
npm run check:lsp-binaries
npm run test:extension-integration
```

Expand Down Expand Up @@ -49,4 +55,4 @@ If smoke checks pass, close or update feature issues as shipped in that release:

## 4. Release note requirement

Document the required system-tool installation and any compatibility changes.
Document that LSP core language features are now available in the extension release that includes the updated binaries.
4 changes: 2 additions & 2 deletions package-lock.json

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

Loading
Loading