Release 0.66.2: every source file names its author
Every tracked file that can carry a comment (880 of them) now opens with "Author: Guoliang Chen, a Senior Digital Design Engineer" and closes with "Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com", in the file's own comment syntax. No behaviour change: the diff outside the version bump and changelogs is comment lines only. - tools/stamp_author.py: writes the lines; idempotent, `--check` lists what is missing. Headers go under a shebang and under Markdown front matter. - Left alone: test fixtures, cases and snapshots (byte-exact inputs), JSON and JSONL, logs, images, lockfiles, docs/site/dist (regenerated) and the LICENSE files (already carry the copyright line). - tools/linux_check.sh: --help reads its header from line 3, now that the author line sits under the shebang. - tools/gates.sh green on this tree: 5 545 tests, corpus 814/6 as before. Co-Authored-By: Claude Mythos 5.2 <[email protected]>
This commit is contained in:
1 parent
3823b85667
commit
71d13b5fbe
883 files changed
+3620
-15
No files matched your search
@@ -1,3 +1,5 @@
|
|||||||
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
# CI: the three checks CLAUDE.md requires before any work is finished,
|
# CI: the three checks CLAUDE.md requires before any work is finished,
|
||||||
# plus the extension's JavaScript tests and the corpus gate, enforced on
|
# plus the extension's JavaScript tests and the corpus gate, enforced on
|
||||||
# every push. Runs on the self-hosted macOS runner in host mode (no
|
# every push. Runs on the self-hosted macOS runner in host mode (no
|
||||||
@@ -64,3 +66,5 @@ jobs:
|
|||||||
run: cargo clippy --all-targets -- -D warnings
|
run: cargo clippy --all-targets -- -D warnings
|
||||||
- name: cargo test
|
- name: cargo test
|
||||||
run: cargo test --workspace
|
run: cargo test --workspace
|
||||||
|
|
||||||
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
# Release: pushing a tag `vX.Y.Z` builds every distribution artifact and
|
# Release: pushing a tag `vX.Y.Z` builds every distribution artifact and
|
||||||
# publishes a Gitea release with the CHANGELOG section for that version as
|
# publishes a Gitea release with the CHANGELOG section for that version as
|
||||||
# its notes. What the release page carries is the seven .vsix packages —
|
# its notes. What the release page carries is the seven .vsix packages —
|
||||||
@@ -67,3 +69,5 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
LUCISV_API_URL: ${{ vars.LUCISV_API_URL }}
|
LUCISV_API_URL: ${{ vars.LUCISV_API_URL }}
|
||||||
run: tools/publish_release.sh "$GITHUB_REF_NAME" dist
|
run: tools/publish_release.sh "$GITHUB_REF_NAME" dist
|
||||||
|
|
||||||
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
/target
|
/target
|
||||||
/corpus
|
/corpus
|
||||||
/corpus-check-results.tsv
|
/corpus-check-results.tsv
|
||||||
@@ -8,3 +10,5 @@
|
|||||||
/.zcode
|
/.zcode
|
||||||
/.claude
|
/.claude
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
||||||
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,9 +1,28 @@
|
|||||||
|
<!-- Author: Guoliang Chen, a Senior Digital Design Engineer -->
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
All notable changes to lucisv are recorded here. Versions follow
|
All notable changes to lucisv are recorded here. Versions follow
|
||||||
[semantic versioning](https://semver.org/); until 1.0 the CLI's exit codes
|
[semantic versioning](https://semver.org/); until 1.0 the CLI's exit codes
|
||||||
(see `README.md`) are the only frozen contract.
|
(see `README.md`) are the only frozen contract.
|
||||||
|
|
||||||
|
## 0.66.2 — 2026-11-24
|
||||||
|
|
||||||
|
### Every source file names its author
|
||||||
|
|
||||||
|
- **No behaviour change.** Every tracked file that can carry a comment — 880
|
||||||
|
of them: the Rust sources, the extension's JavaScript, the scripts, the
|
||||||
|
manifests, the workflows and the documentation — now opens with an author
|
||||||
|
line and closes with one. The binaries and the formatter's, linter's and
|
||||||
|
language server's output are what 0.66.1 produced.
|
||||||
|
- `tools/stamp_author.py` writes the lines and is idempotent; run it after
|
||||||
|
adding files (`--check` lists what is missing). It leaves alone what a
|
||||||
|
comment would break or what is regenerated: test fixtures, cases and
|
||||||
|
snapshots, JSON and JSONL, logs, images, lockfiles, the built site under
|
||||||
|
`docs/site/dist` and the `LICENSE` files.
|
||||||
|
- `tools/linux_check.sh --help` reads its own header one line further down,
|
||||||
|
since the author line now sits under the shebang.
|
||||||
|
|
||||||
## 0.66.1 — 2026-11-19
|
## 0.66.1 — 2026-11-19
|
||||||
|
|
||||||
### Sticky scroll pins the module instance
|
### Sticky scroll pins the module instance
|
||||||
@@ -3442,3 +3461,5 @@ compiler directive any more. Details:
|
|||||||
[macro items](docs/features/macro-items/README.md),
|
[macro items](docs/features/macro-items/README.md),
|
||||||
[directives in lists](docs/features/directives-in-lists/README.md) and
|
[directives in lists](docs/features/directives-in-lists/README.md) and
|
||||||
[in instances](docs/features/directives-in-instances/README.md).
|
[in instances](docs/features/directives-in-instances/README.md).
|
||||||
|
|
||||||
|
<!-- Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com -->
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
<!-- Author: Guoliang Chen, a Senior Digital Design Engineer -->
|
||||||
|
|
||||||
# CLAUDE.md — rules for all agents working on lucisv
|
# CLAUDE.md — rules for all agents working on lucisv
|
||||||
|
|
||||||
lucisv is a ruff-style Verilog/SystemVerilog formatter/linter in Rust.
|
lucisv is a ruff-style Verilog/SystemVerilog formatter/linter in Rust.
|
||||||
@@ -225,3 +227,5 @@ proven independent and run serially. Rules for a parallel wave:
|
|||||||
not actually independent, which is a planning failure to record.
|
not actually independent, which is a planning failure to record.
|
||||||
- After merging, the lead updates `docs/topo.md` for any edge a lane added
|
- After merging, the lead updates `docs/topo.md` for any edge a lane added
|
||||||
or amended, so the next wave plans against reality.
|
or amended, so the next wave plans against reality.
|
||||||
|
|
||||||
|
<!-- Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com -->
|
||||||
Generated
+9
-9
@@ -97,7 +97,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lucisv"
|
name = "lucisv"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lucisv_core",
|
"lucisv_core",
|
||||||
"rayon",
|
"rayon",
|
||||||
@@ -108,11 +108,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lucisv_core"
|
name = "lucisv_core"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lucisv_mcp"
|
name = "lucisv_mcp"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lucisv_core",
|
"lucisv_core",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -126,7 +126,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lucisv_server"
|
name = "lucisv_server"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lsp-server",
|
"lsp-server",
|
||||||
"lsp-types",
|
"lsp-types",
|
||||||
@@ -262,14 +262,14 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vlog_formatter"
|
name = "vlog_formatter"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"vlog_parser",
|
"vlog_parser",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vlog_linter"
|
name = "vlog_linter"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lucisv_core",
|
"lucisv_core",
|
||||||
"vlog_formatter",
|
"vlog_formatter",
|
||||||
@@ -279,11 +279,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vlog_parser"
|
name = "vlog_parser"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vlog_refactor"
|
name = "vlog_refactor"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"vlog_formatter",
|
"vlog_formatter",
|
||||||
"vlog_parser",
|
"vlog_parser",
|
||||||
@@ -292,7 +292,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vlog_semantic"
|
name = "vlog_semantic"
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"vlog_parser",
|
"vlog_parser",
|
||||||
]
|
]
|
||||||
+5
-1
@@ -1,3 +1,5 @@
|
|||||||
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
@@ -13,7 +15,7 @@ members = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.66.1"
|
version = "0.66.2"
|
||||||
authors = ["Guoliang Chen"]
|
authors = ["Guoliang Chen"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@@ -44,3 +46,5 @@ serde_json = "=1.0.140"
|
|||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
|
||||||
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
<!-- Author: Guoliang Chen, a Senior Digital Design Engineer -->
|
||||||
|
|
||||||
# lucisv — Language Utility for Coding In SystemVerilog
|
# lucisv — Language Utility for Coding In SystemVerilog
|
||||||
|
|
||||||
A Verilog and SystemVerilog formatter, linter, and language server written in Rust.
|
A Verilog and SystemVerilog formatter, linter, and language server written in Rust.
|
||||||
@@ -1145,3 +1147,5 @@ where the version number lives, how the `.vsix` is packaged, and what
|
|||||||
marketplace publishing would take if it ever happens — is in
|
marketplace publishing would take if it ever happens — is in
|
||||||
[`tools/RELEASING.md`](tools/RELEASING.md). lucisv is MIT licensed
|
[`tools/RELEASING.md`](tools/RELEASING.md). lucisv is MIT licensed
|
||||||
([`LICENSE`](LICENSE)).
|
([`LICENSE`](LICENSE)).
|
||||||
|
|
||||||
|
<!-- Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com -->
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
<!-- Author: Guoliang Chen, a Senior Digital Design Engineer -->
|
||||||
|
|
||||||
# ROADMAP — autonomous coverage loop
|
# ROADMAP — autonomous coverage loop
|
||||||
|
|
||||||
Running log of the coverage-improvement loop (started 2026-08-20). The metric
|
Running log of the coverage-improvement loop (started 2026-08-20). The metric
|
||||||
@@ -175,3 +177,5 @@ needs macro expansion, a deliberate non-goal) or not valid standalone
|
|||||||
Verilog. The stop condition holds before round 1 of a restart, so **no dev
|
Verilog. The stop condition holds before round 1 of a restart, so **no dev
|
||||||
round was dispatched**. The loop resumes only if open question 2 is decided
|
round was dispatched**. The loop resumes only if open question 2 is decided
|
||||||
(a preprocessing model would put ~1.7% back in reach) or the corpus grows.
|
(a preprocessing model would put ~1.7% back in reach) or the corpus grows.
|
||||||
|
|
||||||
|
<!-- Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com -->
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
<!-- Author: Guoliang Chen, a Senior Digital Design Engineer -->
|
||||||
|
|
||||||
# TODO-MCP — the Model Context Protocol block
|
# TODO-MCP — the Model Context Protocol block
|
||||||
|
|
||||||
Planned 2026-09-23 by the lead at 0.55.0. The analysis and design are in
|
Planned 2026-09-23 by the lead at 0.55.0. The analysis and design are in
|
||||||
@@ -498,3 +500,5 @@ Feature README `docs/features/mcp-read-only`. One dev (Opus), one QA
|
|||||||
item's lines through `format_range` automatically — costs a refusal
|
item's lines through `format_range` automatically — costs a refusal
|
||||||
path when the safety net objects. Default in this plan: not automatic;
|
path when the safety net objects. Default in this plan: not automatic;
|
||||||
the agent calls `format` with `lines`.
|
the agent calls `format` with `lines`.
|
||||||
|
|
||||||
|
<!-- Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com -->
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
<!-- Author: Guoliang Chen, a Senior Digital Design Engineer -->
|
||||||
|
|
||||||
# TODO — best practices adopted from ruff and Verible
|
# TODO — best practices adopted from ruff and Verible
|
||||||
|
|
||||||
Curated backlog for lucisv, drawn from `astral-sh/ruff` (architecture, CLI/UX,
|
Curated backlog for lucisv, drawn from `astral-sh/ruff` (architecture, CLI/UX,
|
||||||
@@ -7524,3 +7526,5 @@ feature README `docs/features/instance-folding/README.md`.
|
|||||||
- [x] `editors/vscode/README.md`: the sticky-scroll row names the instance.
|
- [x] `editors/vscode/README.md`: the sticky-scroll row names the instance.
|
||||||
- [x] Seen in a running VS Code (owner, 2026-11-19, on the local 0.66.1
|
- [x] Seen in a running VS Code (owner, 2026-11-19, on the local 0.66.1
|
||||||
build). Shipped as 0.66.1.
|
build). Shipped as 0.66.1.
|
||||||
|
|
||||||
|
<!-- Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com -->
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "lucisv"
|
name = "lucisv"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
@@ -15,3 +17,5 @@ vlog_parser = { path = "../vlog_parser" }
|
|||||||
vlog_formatter = { path = "../vlog_formatter" }
|
vlog_formatter = { path = "../vlog_formatter" }
|
||||||
vlog_linter = { path = "../vlog_linter" }
|
vlog_linter = { path = "../vlog_linter" }
|
||||||
rayon = { workspace = true }
|
rayon = { workspace = true }
|
||||||
|
|
||||||
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Hand-rolled command line parsing for the `lucisv` binary.
|
//! Hand-rolled command line parsing for the `lucisv` binary.
|
||||||
|
|
||||||
use lucisv_core::cache;
|
use lucisv_core::cache;
|
||||||
@@ -751,3 +753,5 @@ mod tests {
|
|||||||
assert!(!parse(&["check", "rtl"]).unwrap().rules_doc);
|
assert!(!parse(&["check", "rtl"]).unwrap().rules_doc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `--diff`'s unified diff. The printer lives in `lucisv_core::diff`, shared
|
//! `--diff`'s unified diff. The printer lives in `lucisv_core::diff`, shared
|
||||||
//! with the MCP server's `dry_run` (Handshake MCP-1, a pure move); this module
|
//! with the MCP server's `dry_run` (Handshake MCP-1, a pure move); this module
|
||||||
//! keeps the CLI's `diff::unified` path.
|
//! keeps the CLI's `diff::unified` path.
|
||||||
|
|
||||||
pub use lucisv_core::diff::unified;
|
pub use lucisv_core::diff::unified;
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The `lucisv check` driver: lint files, print diagnostics, apply fixes.
|
//! The `lucisv check` driver: lint files, print diagnostics, apply fixes.
|
||||||
//!
|
//!
|
||||||
//! Everything about *which* files are linted — the walk, `--exclude`,
|
//! Everything about *which* files are linted — the walk, `--exclude`,
|
||||||
@@ -880,3 +882,5 @@ mod tests {
|
|||||||
assert_eq!(quote("bell\u{7}"), "\"bell\\u0007\"");
|
assert_eq!(quote("bell\u{7}"), "\"bell\\u0007\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! lucisv — a Verilog/SystemVerilog formatter and linter in the spirit of
|
//! lucisv — a Verilog/SystemVerilog formatter and linter in the spirit of
|
||||||
//! `ruff format` and `ruff check`.
|
//! `ruff format` and `ruff check`.
|
||||||
//!
|
//!
|
||||||
@@ -666,3 +668,5 @@ mod tests {
|
|||||||
assert!(err.contains("parse error"), "{err}");
|
assert!(err.contains("parse error"), "{err}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! End-to-end tests that drive the real `lucisv` binary.
|
//! End-to-end tests that drive the real `lucisv` binary.
|
||||||
//!
|
//!
|
||||||
//! Fixtures use the most trivial Verilog possible so these tests stay
|
//! Fixtures use the most trivial Verilog possible so these tests stay
|
||||||
@@ -2463,3 +2465,5 @@ fn text_that_merely_says_package_changes_no_finding() {
|
|||||||
"{plain}\n---\n{with_noise}"
|
"{plain}\n---\n{with_noise}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `--style` and `[format] style` through the real `lucisv` binary: the
|
//! `--style` and `[format] style` through the real `lucisv` binary: the
|
||||||
//! flag, the config key, their precedence over each other and under the
|
//! flag, the config key, their precedence over each other and under the
|
||||||
//! explicit `indent`/`line-length`, the error for a name that is not a
|
//! explicit `indent`/`line-length`, the error for a name that is not a
|
||||||
@@ -169,3 +171,5 @@ fn changing_the_style_invalidates_the_cache_entry() {
|
|||||||
let out = run(&["--check", &path, "--cache-dir", &cache]);
|
let out = run(&["--check", &path, "--cache-dir", &cache]);
|
||||||
assert_eq!(code(&out), 1, "{}", stderr(&out));
|
assert_eq!(code(&out), 1, "{}", stderr(&out));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "lucisv_core"
|
name = "lucisv_core"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
@@ -10,3 +12,5 @@ name = "lucisv_core"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Replacing a file's contents without ever leaving it half written.
|
//! Replacing a file's contents without ever leaving it half written.
|
||||||
//!
|
//!
|
||||||
//! `fs::write` truncates the target and then writes into it, so a crash, a
|
//! `fs::write` truncates the target and then writes into it, so a crash, a
|
||||||
@@ -449,3 +451,5 @@ mod tests {
|
|||||||
assert_eq!(fs::metadata(&target).expect("stat").permissions().mode() & 0o777, 0o600);
|
assert_eq!(fs::metadata(&target).expect("stat").permissions().mode() & 0o777, 0o600);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The "already formatted" cache: a per-path record of content that a
|
//! The "already formatted" cache: a per-path record of content that a
|
||||||
//! previous run verified is a fixed point, so a repeat run can skip the
|
//! previous run verified is a fixed point, so a repeat run can skip the
|
||||||
//! file entirely.
|
//! file entirely.
|
||||||
@@ -539,3 +541,5 @@ mod tests {
|
|||||||
assert!(!Cache::load(&dir.path).is_clean(&weird, entry(1)));
|
assert!(!Cache::load(&dir.path).is_clean(&weird, entry(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `lucisv.toml` / `.lucisv.toml` discovery and its TOML-subset parser.
|
//! `lucisv.toml` / `.lucisv.toml` discovery and its TOML-subset parser.
|
||||||
//!
|
//!
|
||||||
//! Only what a small config file needs is supported (comments, `key = int`,
|
//! Only what a small config file needs is supported (comments, `key = int`,
|
||||||
@@ -987,3 +989,5 @@ exclude = [ \"build\", \"*_gen.sv\", ]
|
|||||||
assert_eq!(discovery.for_file(Path::new("y.sv")).unwrap().indent, Some(4));
|
assert_eq!(discovery.for_file(Path::new("y.sv")).unwrap().indent, Some(4));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! A small line-oriented unified diff: the CLI's `--diff` and the MCP
|
//! A small line-oriented unified diff: the CLI's `--diff` and the MCP
|
||||||
//! server's `dry_run` print the same hunks through this one function.
|
//! server's `dry_run` print the same hunks through this one function.
|
||||||
//! Moved here from `crates/lucisv/src/diff.rs` unchanged (Handshake MCP-1,
|
//! Moved here from `crates/lucisv/src/diff.rs` unchanged (Handshake MCP-1,
|
||||||
@@ -219,3 +221,5 @@ mod tests {
|
|||||||
assert!(d.contains("-a\n-b\n+x\n+y\n"), "{d}");
|
assert!(d.contains("-a\n-b\n+x\n+y\n"), "{d}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! EDA filelist (`-f`) parsing: the project file every Verilog build
|
//! EDA filelist (`-f`) parsing: the project file every Verilog build
|
||||||
//! already has.
|
//! already has.
|
||||||
//!
|
//!
|
||||||
@@ -591,3 +593,5 @@ missing.sv
|
|||||||
assert_eq!(list.warnings.len(), 2, "{:?}", list.warnings);
|
assert_eq!(list.warnings.len(), 2, "{:?}", list.warnings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The parts of lucisv that decide *which* files are processed and *with what
|
//! The parts of lucisv that decide *which* files are processed and *with what
|
||||||
//! settings*, shared by the `lucisv` CLI and the `lucisv-server` language server.
|
//! settings*, shared by the `lucisv` CLI and the `lucisv-server` language server.
|
||||||
//!
|
//!
|
||||||
@@ -20,3 +22,5 @@ pub mod config;
|
|||||||
pub mod diff;
|
pub mod diff;
|
||||||
pub mod filelist;
|
pub mod filelist;
|
||||||
pub mod walk;
|
pub mod walk;
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! File discovery: directory walking, `--exclude` matching and the
|
//! File discovery: directory walking, `--exclude` matching and the
|
||||||
//! `.gitignore` subset documented in
|
//! `.gitignore` subset documented in
|
||||||
//! `docs/features/parallel-files/README.md`.
|
//! `docs/features/parallel-files/README.md`.
|
||||||
@@ -1103,3 +1105,5 @@ mod tests {
|
|||||||
assert!(!tracker.has_conflict());
|
assert!(!tracker.has_conflict());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "lucisv_mcp"
|
name = "lucisv_mcp"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
@@ -21,3 +23,5 @@ vlog_formatter = { path = "../vlog_formatter" }
|
|||||||
vlog_linter = { path = "../vlog_linter" }
|
vlog_linter = { path = "../vlog_linter" }
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|
||||||
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The one write path every edit tool goes through.
|
//! The one write path every edit tool goes through.
|
||||||
//!
|
//!
|
||||||
//! A tool hands over a [`Plan`] — per file, the text it computed against and
|
//! A tool hands over a [`Plan`] — per file, the text it computed against and
|
||||||
@@ -361,3 +363,5 @@ mod tests {
|
|||||||
fs::remove_dir_all(dir).unwrap();
|
fs::remove_dir_all(dir).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The index caches a startup reads instead of parsing (PLAN §6): the
|
//! The index caches a startup reads instead of parsing (PLAN §6): the
|
||||||
//! language server's `index-cache`, **read only, never written**, and this
|
//! language server's `index-cache`, **read only, never written**, and this
|
||||||
//! server's own `index-cache-mcp` beside it, in the same codec, written once
|
//! server's own `index-cache-mcp` beside it, in the same codec, written once
|
||||||
@@ -221,3 +223,5 @@ fn store_lines(bytes: &[u8]) -> Vec<&[u8]> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
Vendored
+4
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The caches against the rebuild oracle: an index started from records is
|
//! The caches against the rebuild oracle: an index started from records is
|
||||||
//! the index a cold build over the same files makes
|
//! the index a cold build over the same files makes
|
||||||
//! (`WorkspaceIndex::fingerprint`), and every record that is not exactly
|
//! (`WorkspaceIndex::fingerprint`), and every record that is not exactly
|
||||||
@@ -141,3 +143,5 @@ fn a_record_filed_under_another_path_or_hash_is_not_taken() {
|
|||||||
assert!(parse("0000000000000007\tx").is_none(), "no checksum");
|
assert!(parse("0000000000000007\tx").is_none(), "no checksum");
|
||||||
assert!(parse("7\tx\t0000000000000000").is_none(), "a hash of the wrong width");
|
assert!(parse("7\tx\t0000000000000000").is_none(), "a hash of the wrong width");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `lucisv-mcp` — lucisv as a Model Context Protocol server, over stdio.
|
//! `lucisv-mcp` — lucisv as a Model Context Protocol server, over stdio.
|
||||||
//!
|
//!
|
||||||
//! A coding agent (Claude Code, Cursor, VS Code's agent mode) spawns this
|
//! A coding agent (Claude Code, Cursor, VS Code's agent mode) spawns this
|
||||||
@@ -142,3 +144,5 @@ mod tests {
|
|||||||
assert_eq!(parse(&[]).unwrap(), Options::default());
|
assert_eq!(parse(&[]).unwrap(), Options::default());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! One file, fully analyzed, and a small cache of them keyed by content.
|
//! One file, fully analyzed, and a small cache of them keyed by content.
|
||||||
//!
|
//!
|
||||||
//! The index answers workspace questions without keeping any file's text;
|
//! The index answers workspace questions without keeping any file's text;
|
||||||
@@ -140,3 +142,5 @@ mod tests {
|
|||||||
assert!(cache.get(Path::new("a"), 1).is_none());
|
assert!(cache.get(Path::new("a"), 1).is_none());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Which files the project is made of, and what each one looked like when it
|
//! Which files the project is made of, and what each one looked like when it
|
||||||
//! was last read: the filelist-or-walk ladder of PLAN §4.4 over
|
//! was last read: the filelist-or-walk ladder of PLAN §4.4 over
|
||||||
//! `lucisv_core`, and the per-file stamp the freshness sweep compares against.
|
//! `lucisv_core`, and the per-file stamp the freshness sweep compares against.
|
||||||
@@ -508,3 +510,5 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The project one server answers about: its roots, its files, the workspace
|
//! The project one server answers about: its roots, its files, the workspace
|
||||||
//! index over them, and the promise that no answer is older than the disk
|
//! index over them, and the promise that no answer is older than the disk
|
||||||
//! was when the call arrived (PLAN §4.4).
|
//! was when the call arrived (PLAN §4.4).
|
||||||
@@ -359,3 +361,5 @@ fn relative_to(roots: &[PathBuf], path: &Path) -> String {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The freshness promise, against the rebuild oracle: after every update
|
//! The freshness promise, against the rebuild oracle: after every update
|
||||||
//! path the incrementally maintained index is the index a full build over
|
//! path the incrementally maintained index is the index a full build over
|
||||||
//! the files now on disk produces (`WorkspaceIndex::fingerprint`).
|
//! the files now on disk produces (`WorkspaceIndex::fingerprint`).
|
||||||
@@ -106,3 +108,5 @@ fn a_path_argument_must_land_inside_a_root() {
|
|||||||
fs::remove_dir_all(dir).unwrap();
|
fs::remove_dir_all(dir).unwrap();
|
||||||
fs::remove_dir_all(outside).unwrap();
|
fs::remove_dir_all(outside).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The rendering rules every tool's text answer follows (PLAN §10.2): the
|
//! The rendering rules every tool's text answer follows (PLAN §10.2): the
|
||||||
//! token budget is the product.
|
//! token budget is the product.
|
||||||
//!
|
//!
|
||||||
@@ -205,3 +207,5 @@ mod tests {
|
|||||||
assert_eq!(by_file(&sites), ["b.sv:3,9", "a.sv:1"]);
|
assert_eq!(by_file(&sites), ["b.sv:3,9", "a.sv:1"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The `lucisv://` resources: the project overview, the lint rule
|
//! The `lucisv://` resources: the project overview, the lint rule
|
||||||
//! reference, one unit's outline and one file's outline — the same answers
|
//! reference, one unit's outline and one file's outline — the same answers
|
||||||
//! `hierarchy` and `outline` give, addressable by URI for a host that
|
//! `hierarchy` and `outline` give, addressable by URI for a host that
|
||||||
@@ -176,3 +178,5 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The JSON-RPC 2.0 envelope and the MCP methods this server answers: the
|
//! The JSON-RPC 2.0 envelope and the MCP methods this server answers: the
|
||||||
//! `initialize` handshake and its version negotiation, `ping`, the tool
|
//! `initialize` handshake and its version negotiation, `ping`, the tool
|
||||||
//! methods, the `lucisv://` resources, and an empty prompt list.
|
//! methods, the `lucisv://` resources, and an empty prompt list.
|
||||||
@@ -421,3 +423,5 @@ mod tests {
|
|||||||
assert!(bad_tool["error"]["message"].as_str().unwrap().contains("nope"));
|
assert!(bad_tool["error"]["message"].as_str().unwrap().contains("nope"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The declarations the files' own symbol tables hold — every one the
|
//! The declarations the files' own symbol tables hold — every one the
|
||||||
//! semantic model knows and `outline` lists: typedefs, enum values,
|
//! semantic model knows and `outline` lists: typedefs, enum values,
|
||||||
//! functions, tasks, genvars, generate blocks and what they declare,
|
//! functions, tasks, genvars, generate blocks and what they declare,
|
||||||
@@ -94,3 +96,5 @@ fn unit_at(items: &[Item], span: TextRange) -> Option<&str> {
|
|||||||
let inner = child_items(&item.kind).into_iter().find_map(|items| unit_at(items, span));
|
let inner = child_items(&item.kind).into_iter().find_map(|items| unit_at(items, span));
|
||||||
inner.or(own.filter(|(_, name_span)| *name_span != span).map(|(name, _)| name))
|
inner.or(own.filter(|(_, name_span)| *name_span != span).map(|(name, _)| name))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `check`: what `lucisv check` would say about one file or the whole
|
//! `check`: what `lucisv check` would say about one file or the whole
|
||||||
//! design — the tolerant parse's errors, then the lint findings — one line
|
//! design — the tolerant parse's errors, then the lint findings — one line
|
||||||
//! each, `file:line:col severity message [rule]`, errors first.
|
//! each, `file:line:col severity message [rule]`, errors first.
|
||||||
@@ -325,3 +327,5 @@ impl MentionOracle for Mentions<'_> {
|
|||||||
PackageExports::exports(self.index, package)
|
PackageExports::exports(self.index, package)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `rename`, and what every design-wide edit shares: the whole-set read the
|
//! `rename`, and what every design-wide edit shares: the whole-set read the
|
||||||
//! engines are handed, and the step from a verified `RefactorEdit` to a
|
//! engines are handed, and the step from a verified `RefactorEdit` to a
|
||||||
//! written plan with the name's unresolved mentions listed.
|
//! written plan with the name's unresolved mentions listed.
|
||||||
@@ -221,3 +223,5 @@ fn written_ranges(edits: &[TextEdit]) -> Vec<TextRange> {
|
|||||||
}
|
}
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `find`: where a name is declared and, on `refs`, where each declaration
|
//! `find`: where a name is declared and, on `refs`, where each declaration
|
||||||
//! is used — the question an agent otherwise answers by grepping and
|
//! is used — the question an agent otherwise answers by grepping and
|
||||||
//! reading. Declarations come from the index (`names.rs`); uses from
|
//! reading. Declarations come from the index (`names.rs`); uses from
|
||||||
@@ -197,3 +199,5 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `format`: the CLI's `lucisv format` over a path or a glob, and with
|
//! `format`: the CLI's `lucisv format` over a path or a glob, and with
|
||||||
//! `fix` the CLI's `lucisv check --fix` first — each file through the one
|
//! `fix` the CLI's `lucisv check --fix` first — each file through the one
|
||||||
//! write path (`apply.rs`).
|
//! write path (`apply.rs`).
|
||||||
@@ -218,3 +220,5 @@ mod tests {
|
|||||||
assert!(formatter_config(&auto).auto_style);
|
assert!(formatter_config(&auto).auto_style);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Path globs, as `format`'s `files` takes them: `*` and `?` within one
|
//! Path globs, as `format`'s `files` takes them: `*` and `?` within one
|
||||||
//! path component, `**` for any run of components, and a bare directory
|
//! path component, `**` for any run of components, and a bare directory
|
||||||
//! for everything below it — the `.gitignore` / `rg -g` reading.
|
//! for everything below it — the `.gitignore` / `rg -g` reading.
|
||||||
@@ -100,3 +102,5 @@ mod tests {
|
|||||||
assert!(!path_match("ip/**", "hw/ip/aes.sv"));
|
assert!(!path_match("ip/**", "hw/ip/aes.sv"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `hierarchy`: the project's shape. Without a `root`, the counts and the
|
//! `hierarchy`: the project's shape. Without a `root`, the counts and the
|
||||||
//! top modules; with one, the instance tree down from it or every
|
//! top modules; with one, the instance tree down from it or every
|
||||||
//! instantiation of it up to `depth` levels — read off the index's
|
//! instantiation of it up to `depth` levels — read off the index's
|
||||||
@@ -369,3 +371,5 @@ fn statement(project: &Project, texts: &mut Texts, child: &Child) -> Vec<String>
|
|||||||
}
|
}
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `outline unit:` — what a unit offers the code that uses it: a module's
|
//! `outline unit:` — what a unit offers the code that uses it: a module's
|
||||||
//! or interface's parameters and ports in declaration order (plus an
|
//! or interface's parameters and ports in declaration order (plus an
|
||||||
//! interface's modports), a package's or class's members — without the
|
//! interface's modports), a package's or class's members — without the
|
||||||
@@ -228,3 +230,5 @@ fn class_base(items: &[Item], name_span: TextRange) -> Option<String> {
|
|||||||
}
|
}
|
||||||
child_items(&item.kind).into_iter().find_map(|items| class_base(items, name_span))
|
child_items(&item.kind).into_iter().find_map(|items| class_base(items, name_span))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `edit_item` — the structural edits under one name (`replace`,
|
//! `edit_item` — the structural edits under one name (`replace`,
|
||||||
//! `insert_before`, `insert_after`, `delete`), the general token saver: an
|
//! `insert_before`, `insert_after`, `delete`), the general token saver: an
|
||||||
//! agent sends one item's text, never the file.
|
//! agent sends one item's text, never the file.
|
||||||
@@ -373,3 +375,5 @@ fn end_spot(analysis: &Analysis, unit: &str, file: &str) -> Result<Spot, String>
|
|||||||
|
|
||||||
/// The keywords that close a unit `end` may name.
|
/// The keywords that close a unit `end` may name.
|
||||||
const END_WORDS: &[&str] = &["endmodule", "endinterface", "endprogram", "endpackage", "endclass"];
|
const END_WORDS: &[&str] = &["endmodule", "endinterface", "endprogram", "endpackage", "endclass"];
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The verifier's lexical rules — what a splice may do to the token stream
|
//! The verifier's lexical rules — what a splice may do to the token stream
|
||||||
//! and its comments, before any parse is asked:
|
//! and its comments, before any parse is asked:
|
||||||
//!
|
//!
|
||||||
@@ -173,3 +175,5 @@ fn markers(tokens: &[Token], start: u32, end: u32) -> Vec<&str> {
|
|||||||
.map(|e| e.text.trim())
|
.map(|e| e.text.trim())
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `op: delete`'s macro rule: a name spelled inside a macro call's
|
//! `op: delete`'s macro rule: a name spelled inside a macro call's
|
||||||
//! arguments (`` `ASSERT_KNOWN(k, sig) ``) or a `` `define`` body is a use
|
//! arguments (`` `ASSERT_KNOWN(k, sig) ``) or a `` `define`` body is a use
|
||||||
//! no lucisv engine resolves — the lexer keeps a macro call as one token and
|
//! no lucisv engine resolves — the lexer keeps a macro call as one token and
|
||||||
@@ -106,3 +108,5 @@ mod tests {
|
|||||||
assert!(spellings("`define S \"sig\"\n", "sig").is_empty(), "a string is not a use");
|
assert!(spellings("`define S \"sig\"\n", "sig").is_empty(), "a string is not a use");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `edit_item op: delete`'s reference rule: an item is not deleted while a
|
//! `edit_item op: delete`'s reference rule: an item is not deleted while a
|
||||||
//! name it owns (`verify::owned`) is still used anywhere in the project.
|
//! name it owns (`verify::owned`) is still used anywhere in the project.
|
||||||
//!
|
//!
|
||||||
@@ -260,3 +262,5 @@ fn position(project: &Project, set: &WholeSet, file: &Path, span: TextRange) ->
|
|||||||
let (line, col) = LineIndex::new(text).line_col(span.start);
|
let (line, col) = LineIndex::new(text).line_col(span.start);
|
||||||
format!("{}:{line}:{col}", project.relative(file))
|
format!("{}:{line}:{col}", project.relative(file))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Which bytes an item owns: the lines `edit_item`'s inserts and deletes
|
//! Which bytes an item owns: the lines `edit_item`'s inserts and deletes
|
||||||
//! work on, and the span its `replace` replaces when its text brings comments.
|
//! work on, and the span its `replace` replaces when its text brings comments.
|
||||||
//!
|
//!
|
||||||
@@ -155,3 +157,5 @@ mod tests {
|
|||||||
assert_eq!(slice(replace_region(src, item, "logic b;\n// own line")), "logic a;");
|
assert_eq!(slice(replace_region(src, item, "logic b;\n// own line")), "logic a;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `op: delete`'s implicit-connection rule: a `.*` binds a signal without
|
//! `op: delete`'s implicit-connection rule: a `.*` binds a signal without
|
||||||
//! spelling it, so `find_references` (which returns only spans that spell
|
//! spelling it, so `find_references` (which returns only spans that spell
|
||||||
//! the name) never lists it. For each deleted name, every `.*`
|
//! the name) never lists it. For each deleted name, every `.*`
|
||||||
@@ -94,3 +96,5 @@ fn binds(index: &WorkspaceIndex, module: &str, name: &str) -> Option<bool> {
|
|||||||
}
|
}
|
||||||
Some(index.member(module, name).iter().any(|def| def.kind == SymbolKind::Port))
|
Some(index.member(module, name).iter().any(|def| def.kind == SymbolKind::Port))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The verifier the three structural edits share — the one new piece of
|
//! The verifier the three structural edits share — the one new piece of
|
||||||
//! logic in the MCP block, so it is guilty until proven innocent: every rule
|
//! logic in the MCP block, so it is guilty until proven innocent: every rule
|
||||||
//! here has an attack in `tests/attacks.rs`.
|
//! here has an attack in `tests/attacks.rs`.
|
||||||
@@ -573,3 +575,5 @@ mod tests {
|
|||||||
assert!(owned_names(&analysis, always).is_empty());
|
assert!(owned_names(&analysis, always).is_empty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Unresolved mentions: every whole-word spelling of a name that no engine
|
//! Unresolved mentions: every whole-word spelling of a name that no engine
|
||||||
//! answer accounted for and that sits where no lucisv engine looks — inside
|
//! answer accounted for and that sits where no lucisv engine looks — inside
|
||||||
//! a string literal, a comment, a macro call's text, a `` `define`` body, or
|
//! a string literal, a comment, a macro call's text, a `` `define`` body, or
|
||||||
@@ -345,3 +347,5 @@ mod tests {
|
|||||||
assert_eq!(shared_components(a, b), 4);
|
assert_eq!(shared_components(a, b), 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The tool registry: every tool's name, description, argument list and
|
//! The tool registry: every tool's name, description, argument list and
|
||||||
//! handler, in one table. The argument list is the single source of both the
|
//! handler, in one table. The argument list is the single source of both the
|
||||||
//! `inputSchema` a host shows the agent and the validation a call's
|
//! `inputSchema` a host shows the agent and the validation a call's
|
||||||
@@ -313,3 +315,5 @@ mod tests {
|
|||||||
assert_eq!(schema(hierarchy.params)["properties"]["depth"], json!({"type": "integer"}));
|
assert_eq!(schema(hierarchy.params)["properties"]["depth"], json!({"type": "integer"}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Names looked up — the by-name half every lean tool shares: every
|
//! Names looked up — the by-name half every lean tool shares: every
|
||||||
//! declaration of a name (the index's units, exported members and module
|
//! declaration of a name (the index's units, exported members and module
|
||||||
//! internals, every declaration the files' own symbol tables hold, and the
|
//! internals, every declaration the files' own symbol tables hold, and the
|
||||||
@@ -232,3 +234,5 @@ mod tests {
|
|||||||
assert_eq!(qualified(".x"), (None, ".x"));
|
assert_eq!(qualified(".x"), (None, ".x"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `outline`: a file's declarations as a tree with line ranges (its parse
|
//! `outline`: a file's declarations as a tree with line ranges (its parse
|
||||||
//! errors first), or — for `unit` — what a unit offers the code that uses
|
//! errors first), or — for `unit` — what a unit offers the code that uses
|
||||||
//! it (`interface.rs`), so an agent reads the shape before the source.
|
//! it (`interface.rs`), so an agent reads the shape before the source.
|
||||||
@@ -59,3 +61,5 @@ fn tree(analysis: &Analysis, nodes: &[DocumentSymbol], level: usize, out: &mut V
|
|||||||
tree(analysis, &node.children, level + 1, out);
|
tree(analysis, &node.children, level + 1, out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `port`'s `after`: the new port placed right after a named one, in the
|
//! `port`'s `after`: the new port placed right after a named one, in the
|
||||||
//! layout of the line it follows, and each named connection placed right
|
//! layout of the line it follows, and each named connection placed right
|
||||||
//! after the instance's `.after(…)`.
|
//! after the instance's `.after(…)`.
|
||||||
@@ -446,3 +448,5 @@ mod tests {
|
|||||||
assert_eq!(appended_expr(".e(x)", "d"), None);
|
assert_eq!(appended_expr(".e(x)", "d"), None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Where a new list element goes after its anchor, and how it is written.
|
//! Where a new list element goes after its anchor, and how it is written.
|
||||||
//!
|
//!
|
||||||
//! The element always goes **after the separator that follows the anchor**
|
//! The element always goes **after the separator that follows the anchor**
|
||||||
@@ -304,3 +306,5 @@ mod tests {
|
|||||||
assert_eq!(split_declaration("input dbg_i").unwrap().ty, "");
|
assert_eq!(split_declaration("input dbg_i").unwrap().ty, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The check a placement must pass before anything is written: the placed
|
//! The check a placement must pass before anything is written: the placed
|
||||||
//! edit is the engine's verified edit with elements **moved and nothing
|
//! edit is the engine's verified edit with elements **moved and nothing
|
||||||
//! else**. Per file, against the engine's result:
|
//! else**. Per file, against the engine's result:
|
||||||
@@ -308,3 +310,5 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `port`: add a port to a module and connect it by name in every
|
//! `port`: add a port to a module and connect it by name in every
|
||||||
//! instantiation, or remove one and its connection everywhere — the
|
//! instantiation, or remove one and its connection everywhere — the
|
||||||
//! design-wide edit a file write cannot do safely. `add` is
|
//! design-wide edit a file write cannot do safely. `add` is
|
||||||
@@ -144,3 +146,5 @@ fn instantiations(project: &Project, module: &str) -> (usize, usize) {
|
|||||||
let files: BTreeSet<_> = edges.iter().map(|edge| edge.file).collect();
|
let files: BTreeSet<_> = edges.iter().map(|edge| edge.file).collect();
|
||||||
(count, files.len())
|
(count, files.len())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `read`: one item's exact source — a slice, never the file — preceded by
|
//! `read`: one item's exact source — a slice, never the file — preceded by
|
||||||
//! `file:first–last`. In a named `file` the item is sliced as
|
//! `file:first–last`. In a named `file` the item is sliced as
|
||||||
//! `read_item::select` slices it; without one the name is looked up
|
//! `read_item::select` slices it; without one the name is looked up
|
||||||
@@ -78,3 +80,5 @@ fn locate(project: &mut Project, selector: &str) -> Result<PathBuf, String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The item slicer `read` and `edit_item` share: one item's exact span in
|
//! The item slicer `read` and `edit_item` share: one item's exact span in
|
||||||
//! a file — a module, a function, a declaration, an instance, or an
|
//! a file — a module, a function, a declaration, an instance, or an
|
||||||
//! unlabelled `always` block named by the line it covers.
|
//! unlabelled `always` block named by the line it covers.
|
||||||
@@ -317,3 +319,5 @@ module n; logic q; endmodule
|
|||||||
assert!(refused.contains("`\\b` on line 12"), "{refused}");
|
assert!(refused.contains("`\\b` on line 12"), "{refused}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Declaration sites read back off the disk: `find` and the by-name tools
|
//! Declaration sites read back off the disk: `find` and the by-name tools
|
||||||
//! answer with `file:line` for declarations in files no analysis is held
|
//! answer with `file:line` for declarations in files no analysis is held
|
||||||
//! for. One read per file per call ([`Texts`]); the index's spans are
|
//! for. One read per file per call ([`Texts`]); the index's spans are
|
||||||
@@ -271,3 +273,5 @@ mod tests {
|
|||||||
assert_eq!(capped("x y", 3), "x y");
|
assert_eq!(capped("x y", 3), "x y");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The MCP stdio transport: one JSON-RPC message per line in, one per line
|
//! The MCP stdio transport: one JSON-RPC message per line in, one per line
|
||||||
//! out. stdout carries protocol lines and nothing else; stderr is the log.
|
//! out. stdout carries protocol lines and nothing else; stderr is the log.
|
||||||
//!
|
//!
|
||||||
@@ -93,3 +95,5 @@ mod tests {
|
|||||||
assert_eq!(written, "{\"text\":\"a\\nb\"}\n");
|
assert_eq!(written, "{\"text\":\"a\\nb\"}\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The dev's attack suite on the structural edits' verifier (lane M4) —
|
//! The dev's attack suite on the structural edits' verifier (lane M4) —
|
||||||
//! CLAUDE.md invariant 4 applied to the MCP block's own safety net: every
|
//! CLAUDE.md invariant 4 applied to the MCP block's own safety net: every
|
||||||
//! case is an edit the verifier could plausibly let through, asserted
|
//! case is an edit the verifier could plausibly let through, asserted
|
||||||
@@ -784,3 +786,5 @@ fn a_signal_bound_by_a_dot_star_is_still_referenced() {
|
|||||||
let clk = json!({"file": "rtl/sw.sv", "item": "clk"});
|
let clk = json!({"file": "rtl/sw.sv", "item": "clk"});
|
||||||
refused(&tree, &mut server, "delete_item", clk, "bound by `.*` at rtl/sw.sv:7:18 `clk`");
|
refused(&tree, &mut server, "delete_item", clk, "bound by `.*` at rtl/sw.sv:7:18 `clk`");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The index caches over the wire (TODO-MCP M6, PLAN §6): the language
|
//! The index caches over the wire (TODO-MCP M6, PLAN §6): the language
|
||||||
//! server's `index-cache` is read and never written — its bytes are hashed
|
//! server's `index-cache` is read and never written — its bytes are hashed
|
||||||
//! before and after a whole session that indexes, answers and edits — every
|
//! before and after a whole session that indexes, answers and edits — every
|
||||||
@@ -276,3 +278,5 @@ fn an_unwritable_cache_directory_still_answers_and_says_so_on_exit() {
|
|||||||
assert_eq!(stderr.matches("cannot write the index cache").count(), 1, "{stderr}");
|
assert_eq!(stderr.matches("cannot write the index cache").count(), 1, "{stderr}");
|
||||||
assert!(fs::read_dir(scratch.cache()).unwrap().next().is_none(), "nothing was written");
|
assert!(fs::read_dir(scratch.cache()).unwrap().next().is_none(), "nothing was written");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The `hierarchy` cap counts instances, never `peek` lines (census round 5,
|
//! The `hierarchy` cap counts instances, never `peek` lines (census round 5,
|
||||||
//! 2026-09-29): an agent asking for every instantiation of a module with
|
//! 2026-09-29): an agent asking for every instantiation of a module with
|
||||||
//! `peek` gets every one up to 100 (300 without `peek`), each with its
|
//! `peek` gets every one up to 100 (300 without `peek`), each with its
|
||||||
@@ -135,3 +137,5 @@ fn over_100_instances_with_peek_shows_100_and_over_300_without_shows_300() {
|
|||||||
assert_eq!(plain.lines().count(), 301);
|
assert_eq!(plain.lines().count(), 301);
|
||||||
assert!(plain.ends_with("\n… and 51 more\n"), "{plain}");
|
assert!(plain.ends_with("\n… and 51 more\n"), "{plain}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The opentitan census (TODO-MCP M2, ported to the lean catalogue in M7):
|
//! The opentitan census (TODO-MCP M2, ported to the lean catalogue in M7):
|
||||||
//! `find`, `hierarchy`, `check` and `outline` over a real checkout,
|
//! `find`, `hierarchy`, `check` and `outline` over a real checkout,
|
||||||
//! read-only, each answer checked against what the language server answers
|
//! read-only, each answer checked against what the language server answers
|
||||||
@@ -288,3 +290,5 @@ fn opentitan_startup_cold_and_warm_and_the_stat_sweep() {
|
|||||||
let _ = std::fs::remove_dir_all(&cache);
|
let _ = std::fs::remove_dir_all(&cache);
|
||||||
assert_eq!(status(&root), before, "the checkout was only read");
|
assert_eq!(status(&root), before, "the checkout was only read");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane feedback-1 (unresolved mentions, `add_port`'s `after`
|
//! QA attacks on lane feedback-1 (unresolved mentions, `add_port`'s `after`
|
||||||
//! and its move-checker, the trimmed catalogue, the temp-store sweep),
|
//! and its move-checker, the trimmed catalogue, the temp-store sweep),
|
||||||
//! 2026-09-23 — ported to the lean catalogue: `add_port` is `port` with
|
//! 2026-09-23 — ported to the lean catalogue: `add_port` is `port` with
|
||||||
@@ -696,3 +698,5 @@ fn qa_the_sweep_takes_only_old_files_of_the_exact_temp_name() {
|
|||||||
}
|
}
|
||||||
assert!(dir.join("inside").is_dir(), "a directory is never swept");
|
assert!(dir.join("inside").is_dir(), "a directory is never swept");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane feedback-2 (the count line on every paged answer, the
|
//! QA attacks on lane feedback-2 (the count line on every paged answer, the
|
||||||
//! `in` path glob, the post-edit check line), 2026-09-23 — ported to the
|
//! `in` path glob, the post-edit check line), 2026-09-23 — ported to the
|
||||||
//! lean catalogue: paging, `in` and the check line are gone (PLAN §10.2),
|
//! lean catalogue: paging, `in` and the check line are gone (PLAN §10.2),
|
||||||
@@ -282,3 +284,5 @@ fn qa_the_glob_matches_paths_never_names_even_escaped_ones_holding_a_star() {
|
|||||||
assert_eq!(formatted("esc/*.sv"), "1");
|
assert_eq!(formatted("esc/*.sv"), "1");
|
||||||
assert!(formatted("\\esc*mod").contains("\\esc*mod"), "a unit name is not a path");
|
assert!(formatted("\\esc*mod").contains("\\esc*mod"), "a unit name is not a path");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane M1 (transport + read tools), 2026-09-23.
|
//! QA attacks on lane M1 (transport + read tools), 2026-09-23.
|
||||||
//!
|
//!
|
||||||
//! Every test spawns the real binary over a scratch tree, as a host would.
|
//! Every test spawns the real binary over a scratch tree, as a host would.
|
||||||
@@ -954,3 +956,5 @@ fn qa_rework_a_rename_over_with_an_old_mtime_and_the_same_size_is_seen() {
|
|||||||
set_mtime(&scratch.path("c.sv"), long_ago);
|
set_mtime(&scratch.path("c.sv"), long_ago);
|
||||||
assert_eq!(s.text("find", json!({"name": "chyrlie"})), "module chyrlie c.sv:1\n");
|
assert_eq!(s.text("find", json!({"name": "chyrlie"})), "module chyrlie c.sv:1\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane M2 (navigation, diagnostics, defines, resources),
|
//! QA attacks on lane M2 (navigation, diagnostics, defines, resources),
|
||||||
//! 2026-09-23 — ported to the lean catalogue (`find`, `hierarchy`, `check`;
|
//! 2026-09-23 — ported to the lean catalogue (`find`, `hierarchy`, `check`;
|
||||||
//! `docs/features/mcp-lean-catalogue/README.md` lists what was deleted: the
|
//! `docs/features/mcp-lean-catalogue/README.md` lists what was deleted: the
|
||||||
@@ -796,3 +798,5 @@ fn qa_recheck_one_files_check_is_its_lines_of_lucisv_check_dot() {
|
|||||||
);
|
);
|
||||||
assert_eq!(s.text("check", json!({"file": "leaf.sv"})), "ok\n");
|
assert_eq!(s.text("check", json!({"file": "leaf.sv"})), "ok\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane M3 (the edit tools and their one write path),
|
//! QA attacks on lane M3 (the edit tools and their one write path),
|
||||||
//! 2026-09-23 — ported to the lean catalogue (`rename`, `port`,
|
//! 2026-09-23 — ported to the lean catalogue (`rename`, `port`,
|
||||||
//! `edit_item`, `format`); the tools it dropped took their attacks with
|
//! `edit_item`, `format`); the tools it dropped took their attacks with
|
||||||
@@ -1226,3 +1228,5 @@ fn qa_a_large_file_behind_a_link_out_of_the_root_is_not_in_the_skipped_set() {
|
|||||||
let text = text_of(&server.rename_d());
|
let text = text_of(&server.rename_d());
|
||||||
assert!(!text.contains(outside.root()), "{text}");
|
assert!(!text.contains(outside.root()), "{text}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane M4 (the structural edits and their verifier),
|
//! QA attacks on lane M4 (the structural edits and their verifier),
|
||||||
//! 2026-09-23.
|
//! 2026-09-23.
|
||||||
//!
|
//!
|
||||||
@@ -1308,3 +1310,5 @@ fn qa_recheck_a_define_item_may_be_inserted_but_not_nested_in_an_always() {
|
|||||||
}
|
}
|
||||||
assert!(strict(&tree.read("rtl/d.sv")));
|
assert!(strict(&tree.read("rtl/d.sv")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane M6 (the index caches and the rule-6 ruling),
|
//! QA attacks on lane M6 (the index caches and the rule-6 ruling),
|
||||||
//! 2026-09-23.
|
//! 2026-09-23.
|
||||||
//!
|
//!
|
||||||
@@ -702,3 +704,5 @@ fn qa_the_instructions_are_short_and_name_only_real_tools() {
|
|||||||
assert!(text.contains(phrase), "{phrase}: {text}");
|
assert!(text.contains(phrase), "{phrase}: {text}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane M7 (the lean catalogue), 2026-09-24.
|
//! QA attacks on lane M7 (the lean catalogue), 2026-09-24.
|
||||||
//!
|
//!
|
||||||
//! Every test writes a small design into its own scratch directory, spawns
|
//! Every test writes a small design into its own scratch directory, spawns
|
||||||
@@ -867,3 +869,5 @@ fn a_members_rename_lists_only_its_own_mentions_and_dotted_ones_elsewhere() {
|
|||||||
let found = text(&tree, "find", json!({"name": "p.W", "refs": true}));
|
let found = text(&tree, "find", json!({"name": "p.W", "refs": true}));
|
||||||
assert!(found.contains("unresolved:\n rtl/u.sv:2\n"), "a package member lists all: {found}");
|
assert!(found.contains("unresolved:\n rtl/u.sv:2\n"), "a package member lists all: {found}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! QA attacks on lane M8 (`--read-only`), 2026-09-29.
|
//! QA attacks on lane M8 (`--read-only`), 2026-09-29.
|
||||||
//!
|
//!
|
||||||
//! Every test copies a fixture into its own scratch directory, spawns the
|
//! Every test copies a fixture into its own scratch directory, spawns the
|
||||||
@@ -562,3 +564,5 @@ fn qa_the_node_cap_is_exact_at_300_and_301_plain_and_100_and_101_with_peek() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `lucisv-mcp --read-only` (PLAN §11), pinned against the real binary: the
|
//! `lucisv-mcp --read-only` (PLAN §11), pinned against the real binary: the
|
||||||
//! five read tools within their budget, the edit tools unknown, full mode as
|
//! five read tools within their budget, the edit tools unknown, full mode as
|
||||||
//! 0.58.0 shipped it, and the promise that nothing inside a root is created,
|
//! 0.58.0 shipped it, and the promise that nothing inside a root is created,
|
||||||
@@ -339,3 +341,5 @@ fn the_edit_calls_write_in_full_mode() {
|
|||||||
assert_ne!(before, snapshot(&tree), "{name} wrote nothing in full mode");
|
assert_ne!(before, snapshot(&tree), "{name} wrote nothing in full mode");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The wire contract, pinned against the real binary: each test copies the
|
//! The wire contract, pinned against the real binary: each test copies the
|
||||||
//! fixture design into its own temporary directory, spawns `lucisv-mcp` over
|
//! fixture design into its own temporary directory, spawns `lucisv-mcp` over
|
||||||
//! it and talks newline-delimited JSON-RPC to it, as a host would.
|
//! it and talks newline-delimited JSON-RPC to it, as a host would.
|
||||||
@@ -1264,3 +1266,5 @@ fn a_stale_temp_store_is_swept_and_a_young_one_and_other_files_are_spared() {
|
|||||||
assert!(young.exists(), "a young one may be a live writer's");
|
assert!(young.exists(), "a young one may be a live writer's");
|
||||||
assert!(other.exists(), "only `<store>.<pid>.tmp` is ours to sweep");
|
assert!(other.exists(), "only `<store>.<pid>.tmp` is ours to sweep");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "lucisv_server"
|
name = "lucisv_server"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
@@ -19,3 +21,5 @@ lsp-server = { workspace = true }
|
|||||||
lsp-types = { workspace = true }
|
lsp-types = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|
||||||
|
# Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The preset `style = "auto"` last settled on, per document.
|
//! The preset `style = "auto"` last settled on, per document.
|
||||||
//!
|
//!
|
||||||
//! Under `auto`, every formatting request needs a concrete preset, and
|
//! Under `auto`, every formatting request needs a concrete preset, and
|
||||||
@@ -402,3 +404,5 @@ endmodule
|
|||||||
assert_eq!(styles.recall(&uri), None, "a whole-document format under a named style");
|
assert_eq!(styles.recall(&uri), None, "a whole-document format under a named style");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The tables a completion request reads instead of walking the workspace.
|
//! The tables a completion request reads instead of walking the workspace.
|
||||||
//!
|
//!
|
||||||
//! Completion fires on every keystroke, so nothing here may be computed per
|
//! Completion fires on every keystroke, so nothing here may be computed per
|
||||||
@@ -1670,3 +1672,5 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Which byte a "symbol under the cursor" request is about.
|
//! Which byte a "symbol under the cursor" request is about.
|
||||||
//!
|
//!
|
||||||
//! An LSP position is a caret *between* two characters, and a span here is
|
//! An LSP position is a caret *between* two characters, and a span here is
|
||||||
@@ -125,3 +127,5 @@ mod tests {
|
|||||||
assert_eq!(lands_on("é|;"), Some(';'), "a non-ASCII letter is not a name");
|
assert_eq!(lands_on("é|;"), Some(';'), "a non-ASCII letter is not a name");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `textDocument/codeAction` — one quick fix per Safe lint fix, plus one
|
//! `textDocument/codeAction` — one quick fix per Safe lint fix, plus one
|
||||||
//! `source.fixAll.lucisv` that applies all of them in a single pass.
|
//! `source.fixAll.lucisv` that applies all of them in a single pass.
|
||||||
//!
|
//!
|
||||||
@@ -476,3 +478,5 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Tiers 2 and 3: what the buffer being typed in declares, and the words it
|
//! Tiers 2 and 3: what the buffer being typed in declares, and the words it
|
||||||
//! uses (TODO §68.1, `completion-ux`).
|
//! uses (TODO §68.1, `completion-ux`).
|
||||||
//!
|
//!
|
||||||
@@ -142,3 +144,5 @@ endmodule
|
|||||||
assert!(sort("al_used") < sort("always_ff"));
|
assert!(sort("al_used") < sort("always_ff"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! What a connection-list entry inserts (TODO §68.1, `completion-ux`).
|
//! What a connection-list entry inserts (TODO §68.1, `completion-ux`).
|
||||||
//!
|
//!
|
||||||
//! After the `.` of `sub u_sub (.cl|` or `sub #(.WI|`, accepting a port or a
|
//! After the `.` of `sub u_sub (.cl|` or `sub #(.WI|`, accepting a port or a
|
||||||
@@ -100,3 +102,5 @@ mod tests {
|
|||||||
assert!(!paren_follows(".cl, .b(x)", 1));
|
assert!(!paren_follows(".cl, .b(x)", 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The completion tests' harness: a scratch workspace on disk, and the
|
//! The completion tests' harness: a scratch workspace on disk, and the
|
||||||
//! handful of helpers every provider's tests ask through.
|
//! handful of helpers every provider's tests ask through.
|
||||||
//!
|
//!
|
||||||
@@ -112,3 +114,5 @@ pub(super) fn find<'a>(items: &'a [CompletionItem], label: &str) -> Option<&'a C
|
|||||||
pub(super) fn labels(items: &[CompletionItem]) -> Vec<&str> {
|
pub(super) fn labels(items: &[CompletionItem]) -> Vec<&str> {
|
||||||
items.iter().map(|item| item.label.as_str()).collect()
|
items.iter().map(|item| item.label.as_str()).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The member answer: after a `.` or a `::`, the members of what stands
|
//! The member answer: after a `.` or a `::`, the members of what stands
|
||||||
//! before it and nothing else.
|
//! before it and nothing else.
|
||||||
//!
|
//!
|
||||||
@@ -1203,3 +1205,5 @@ endmodule
|
|||||||
assert!(items.iter().any(|i| tier(i) == TIER_WORD || tier(i) == TIER_KEYWORD));
|
assert!(items.iter().any(|i| tier(i) == TIER_WORD || tier(i) == TIER_KEYWORD));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! `textDocument/completion` — module hinting, templates, keywords, and every
|
//! `textDocument/completion` — module hinting, templates, keywords, and every
|
||||||
//! name the project uses.
|
//! name the project uses.
|
||||||
//!
|
//!
|
||||||
@@ -917,3 +919,5 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Tier 0 — module names at module-item position — and the instantiation
|
//! Tier 0 — module names at module-item position — and the instantiation
|
||||||
//! planning that `inline.rs`'s ghost and `instantiate.rs`'s command share.
|
//! planning that `inline.rs`'s ghost and `instantiate.rs`'s command share.
|
||||||
//!
|
//!
|
||||||
@@ -921,3 +923,5 @@ endmodule
|
|||||||
assert!(vlog_refactor::module_definition(&index, "nope").is_err());
|
assert!(vlog_refactor::module_definition(&index, "nope").is_err());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The **related** tier: what this file is related to through the workspace
|
//! The **related** tier: what this file is related to through the workspace
|
||||||
//! index, ranked above the rest of the workspace and below the file itself
|
//! index, ranked above the rest of the workspace and below the file itself
|
||||||
//! (`docs/features/fast-actions/README.md`, completion through the
|
//! (`docs/features/fast-actions/README.md`, completion through the
|
||||||
@@ -339,3 +341,5 @@ mod tests {
|
|||||||
assert_eq!(mid.detail.as_deref(), Some("variable — mid_c::zed_mid"));
|
assert_eq!(mid.detail.as_deref(), Some("variable — mid_c::zed_mid"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! What may be written here: the module-item gate and the statement gate,
|
//! What may be written here: the module-item gate and the statement gate,
|
||||||
//! judged over the token stream's scope chain.
|
//! judged over the token stream's scope chain.
|
||||||
//!
|
//!
|
||||||
@@ -262,3 +264,5 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Tiers 1 to 5: the five ordinary tiers, in the order they fill the
|
//! Tiers 1 to 5: the five ordinary tiers, in the order they fill the
|
||||||
//! response.
|
//! response.
|
||||||
//!
|
//!
|
||||||
@@ -944,3 +946,5 @@ endmodule
|
|||||||
assert!(labels(&items).contains(&"ov_in_buffer"), "{:?}", labels(&items));
|
assert!(labels(&items).contains(&"ov_in_buffer"), "{:?}", labels(&items));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! What a completion answer costs on the wire, for a client that can take
|
//! What a completion answer costs on the wire, for a client that can take
|
||||||
//! less (`docs/features/fast-actions/README.md`, "payload").
|
//! less (`docs/features/fast-actions/README.md`, "payload").
|
||||||
//!
|
//!
|
||||||
@@ -146,3 +148,5 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! What is typed: the identifier run ending at the cursor and what stands
|
//! What is typed: the identifier run ending at the cursor and what stands
|
||||||
//! around it — a backtick, a `.` or a `::`, and the spine a separator
|
//! around it — a backtick, a `.` or a `::`, and the spine a separator
|
||||||
//! follows.
|
//! follows.
|
||||||
@@ -244,3 +246,5 @@ pub(super) fn line_head_is_blank(text: &str, at: u32) -> bool {
|
|||||||
let line_start = head.rfind('\n').map_or(0, |newline| newline + 1);
|
let line_start = head.rfind('\n').map_or(0, |newline| newline + 1);
|
||||||
head.get(line_start..).is_some_and(|head| head.chars().all(|c| c == ' ' || c == '\t'))
|
head.get(line_start..).is_some_and(|head| head.chars().all(|c| c == ' ' || c == '\t'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Byte offsets ↔ LSP positions.
|
//! Byte offsets ↔ LSP positions.
|
||||||
//!
|
//!
|
||||||
//! Everything below the protocol speaks UTF-8 byte offsets; LSP `Position`
|
//! Everything below the protocol speaks UTF-8 byte offsets; LSP `Position`
|
||||||
@@ -518,3 +520,5 @@ mod tests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! The VS Code instance-oriented design hierarchy.
|
//! The VS Code instance-oriented design hierarchy.
|
||||||
//!
|
//!
|
||||||
//! LSP call hierarchy deliberately groups a module's calls by target module
|
//! LSP call hierarchy deliberately groups a module's calls by target module
|
||||||
@@ -523,3 +525,5 @@ mod tests {
|
|||||||
.unwrap_or_else(|| panic!("no module {name}: {modules:#?}"))
|
.unwrap_or_else(|| panic!("no module {name}: {modules:#?}"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Diagnostics, published on every buffer change.
|
//! Diagnostics, published on every buffer change.
|
||||||
|
|
||||||
use lsp_types::{Diagnostic, DiagnosticSeverity};
|
use lsp_types::{Diagnostic, DiagnosticSeverity};
|
||||||
@@ -199,3 +201,5 @@ mod tests {
|
|||||||
assert!(diags[0].range.start < diags[0].range.end, "must be drawable");
|
assert!(diags[0].range.start < diags[0].range.end, "must be drawable");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Author: Guoliang Chen, a Senior Digital Design Engineer
|
||||||
|
|
||||||
//! Single-step macro expansion, for hover **display** only.
|
//! Single-step macro expansion, for hover **display** only.
|
||||||
//!
|
//!
|
||||||
//! One step means one thing: the definition's body with the call site's
|
//! One step means one thing: the definition's body with the call site's
|
||||||
@@ -430,3 +432,5 @@ mod tests {
|
|||||||
assert!(!has_macro_use("plain text"));
|
assert!(!has_macro_use("plain text"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Author: Guoliang Chen. Lucisv is made by Guoliang Chen with love, luciochen.com
|
||||||
Loaded 100 of 883 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user