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
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
release_tool: ${{ steps.filter.outputs.release_tool }}
release_source_proof: ${{ steps.filter.outputs.release_source_proof }}
docs: ${{ steps.filter.outputs.docs }}
editors: ${{ steps.filter.outputs.editors }}
registryctl_tutorial: ${{ steps.filter.outputs.registryctl_tutorial }}
steps:
- name: Checkout
Expand All @@ -41,6 +42,7 @@ jobs:
release_tool=false
release_source_proof=false
docs=false
editors=false
registryctl_tutorial=false
all=false

Expand All @@ -60,6 +62,7 @@ jobs:
release_tool=true
release_source_proof=true
docs=true
editors=true
registryctl_tutorial=true
}

Expand Down Expand Up @@ -101,6 +104,11 @@ jobs:
docs=true
;;
esac
case "${path}" in
editors/*)
editors=true
;;
Comment on lines +107 to +110

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run editor checks when the shared server changes

The new editor job is gated only by editors/*, but the VS Code and Zed previews both launch crates/registry-language-server and the job’s own test section builds that crate before exercising the extensions. A PR that changes only crates/registry-language-server sets the existing rust flag via crates/* but leaves editors=false, so the extension-host and Zed integration checks are skipped for the shared protocol/server they depend on.

Useful? React with 👍 / 👎.

esac
case "${path}" in
Cargo.toml|Cargo.lock|rust-toolchain*|LICENSE|docs/site/package.json|docs/site/package-lock.json|docs/site/scripts/check-registryctl-tutorials.sh|docs/site/scripts/registryctl-tutorial.*|docs/site/src/content/docs/tutorials/publish-spreadsheet-secured-registry-api.mdx|docs/site/src/content/docs/tutorials/verify-claim-registry-api.mdx|crates/registry-config-report/*|crates/registry-manifest-*/*|crates/registry-notary/*|crates/registry-notary-*/*|crates/registry-platform-*/*|crates/registry-relay/*|crates/registryctl/*|products/notary/*|release/docker/Dockerfile.registry-notary|release/docker/Dockerfile.registry-relay)
registryctl_tutorial=true
Expand All @@ -114,6 +122,7 @@ jobs:
echo "release_tool=${release_tool}"
echo "release_source_proof=${release_source_proof}"
echo "docs=${docs}"
echo "editors=${editors}"
echo "registryctl_tutorial=${registryctl_tutorial}"
} >> "${GITHUB_OUTPUT}"

Expand Down Expand Up @@ -377,3 +386,39 @@ jobs:
- name: Check docs build
working-directory: docs/site
run: npm run check

editor-extensions:
name: Editor extensions
needs: changes
if: needs.changes.outputs.editors == 'true'
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0
submodules: false

- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: 22.12.0
cache: npm
cache-dependency-path: editors/vscode/package-lock.json

- name: Package and test VS Code developer preview
working-directory: editors/vscode
run: |
npm ci
npm run package:dev
cargo build --locked -p registry-language-server
xvfb-run -a npm test
cmp ../../LICENSE LICENSE

- name: Install Zed extension target
run: rustup target add wasm32-wasip2

- name: Check Zed extension
run: |
cargo check --locked --target wasm32-wasip2 --manifest-path editors/zed/Cargo.toml
cmp LICENSE editors/zed/LICENSE
84 changes: 84 additions & 0 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ members = [
"crates/registry-notary",
"crates/registry-notary-worker-harness",
"crates/registry-relay",
"crates/registry-language-server",
"crates/registryctl",
"products/notary/xtask",
]
Expand Down Expand Up @@ -51,6 +52,7 @@ unsafe_code = "forbid"

[workspace.dependencies]
registry-config-report = { path = "crates/registry-config-report", version = "0.10.0" }
registry-language-server = { path = "crates/registry-language-server", version = "0.10.0" }
registry-manifest-core = { path = "crates/registry-manifest-core", version = "0.10.0" }
registry-notary-client = { path = "crates/registry-notary-client", version = "0.10.0" }
registry-notary-core = { path = "crates/registry-notary-core", version = "0.10.0" }
Expand Down Expand Up @@ -146,6 +148,9 @@ tokio-rustls = { version = "0.26", default-features = false, features = ["ring",
tokio-util = { version = "0.7" }
toml = { version = "1.1" }
tower = { version = "0.5" }
tower-lsp-server = { version = "0.23" }
tree-sitter = { version = "0.26" }
tree-sitter-yaml = { version = "0.7.2" }
tower-http = { version = "0.7", features = ["cors", "limit", "request-id", "set-header", "timeout", "trace"] }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3", features = ["fmt", "json", "env-filter"] }
Expand Down
22 changes: 22 additions & 0 deletions crates/registry-language-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "registry-language-server"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "Cross-file navigation and reference diagnostics for Registry Stack project YAML."
repository.workspace = true

[dependencies]
anyhow.workspace = true
serde_json.workspace = true
tokio = { workspace = true, features = ["io-std"] }
tower-lsp-server.workspace = true
tree-sitter.workspace = true
tree-sitter-yaml.workspace = true

[dev-dependencies]
tempfile.workspace = true

[lints]
workspace = true
36 changes: 36 additions & 0 deletions crates/registry-language-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Registry Stack language server

`registry-language-server` adds Registry Stack project semantics to YAML editors through the
Language Server Protocol. It discovers the bounded authoring surface rooted at
`registry-stack.yaml` and indexes:

- registry, integration, entity, service, consultation, claim, credential-profile, fixture, and
environment definitions;
- integration and entity aliases across the project manifest, their definition files, and
environment files;
- consultation integration references, records-service entity references, credential-profile
claim references, direct claim-output consultation references, and fixture expected-claim
references.

It provides go to definition, find references, workspace symbols, document symbols, and errors for
missing, duplicate, or ambiguous references. It deliberately leaves syntax, schemas, completion,
hover, and formatting to the editor's YAML language server.

## Run

```console
cargo run -p registry-language-server
```

The same server is available from a release installation as:

```console
registryctl authoring language-server
```

The server communicates over standard input and output and expects the opened workspace (or a
nested directory) to be inside a Registry Stack project.

Only regular files in the documented Registry Stack project layout are indexed. Symbolic links,
files outside the project root, unrelated YAML files, and project documents larger than 1 MiB are
ignored. This keeps editor analysis inside the same bounded authoring surface as `registryctl`.
Loading
Loading