Support crates.io publishing and update documentation#33
Conversation
There was a problem hiding this comment.
Pull request overview
Enables publishing the Path Server crate to crates.io and updates public-facing documentation to reflect installation and usage outside of VS Code/Zed.
Changes:
- Add crates.io-related package metadata (homepage/keywords/exclude) and public links/docs updates.
- Hide internal macros and re-exports from generated docs while keeping them usable.
- Extend the release workflow with a crates.io publish job.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/logger.rs |
Hides exported logging macros from rustdoc to reduce public API surface. |
src/lib.rs |
Adds crate-level docs and hides re-exports from rustdoc while preserving binary usage. |
README.md |
Documents installation/usage for other LSP-capable editors and adds crates.io link. |
Cargo.toml |
Adds crates.io metadata and excludes non-essential directories from the published package. |
CHANGELOG.md |
Notes crates.io publishing addition under Unreleased. |
.github/workflows/release.yaml |
Renames GitHub release job and adds crates.io publish job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| keywords = ["lsp", "language-server", "path", "path-completion"] | ||
| license = "Apache-2.0" | ||
| readme = "README.md" | ||
| exclude = ["extensions/**", "assets/**", ".github/**", ".vscode/**"] |
There was a problem hiding this comment.
exclude = ["extensions/**", "assets/**", ...] will omit the demo GIFs referenced by README.md (./assets/demo-*.gif). On crates.io this typically results in broken images in the rendered README. Either include the required assets in the published package, or update the README to use absolute URLs (e.g., raw GitHub links) so crates.io rendering remains correct.
| exclude = ["extensions/**", "assets/**", ".github/**", ".vscode/**"] | |
| exclude = ["extensions/**", ".github/**", ".vscode/**"] |
| //! | ||
| //! **⚠️ WARNING: Internal API** | ||
| //! | ||
| //! This crate is primarily designed to be distributed as a standalone binary. And has no intention to maintain as a library dependency for other projects for now. |
There was a problem hiding this comment.
The crate-level docs read awkwardly/grammatically incorrect: "This crate is primarily designed to be distributed as a standalone binary. And has no intention to maintain as a library dependency..." Consider rewriting as a single sentence (or otherwise polishing) since this will be shown prominently on docs.rs/crates.io.
| //! This crate is primarily designed to be distributed as a standalone binary. And has no intention to maintain as a library dependency for other projects for now. | |
| //! This crate is primarily intended to be distributed as a standalone binary and is not currently maintained as a library dependency for other projects. |
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Install toml-cli | ||
| run: cargo install toml-cli |
There was a problem hiding this comment.
For release reproducibility and to reduce supply-chain risk, consider pinning toml-cli to a specific version (and/or using --locked). Installing the latest toml-cli on every tag means a new upstream release could unexpectedly break this workflow at publish time.
| run: cargo install toml-cli | |
| run: cargo install toml-cli --version 0.2.3 --locked |
| run: npm run build -- --target ${{ matrix.vscode_target }} -o | ||
| ../../dist/path-server_vscode_${{ matrix.vscode_target }}_${{ | ||
| github.ref_name }}.vsix |
There was a problem hiding this comment.
The run: value is split across multiple lines without using a block scalar (|/>), which will insert newlines into the command. That will break the -o <output> argument (and also splits the ${{ github.ref_name }} expression), likely causing the packaging step to fail. Keep the command on one line, or use a run: | block with proper line continuations so the output path stays part of the same command string.
| run: npm run build -- --target ${{ matrix.vscode_target }} -o | |
| ../../dist/path-server_vscode_${{ matrix.vscode_target }}_${{ | |
| github.ref_name }}.vsix | |
| run: | | |
| npm run build -- --target ${{ matrix.vscode_target }} -o \ | |
| ../../dist/path-server_vscode_${{ matrix.vscode_target }}_${{ github.ref_name }}.vsix |
No description provided.