Title: refactor(core): crate 统一放到 rust/crates/,删除社区命令、wasm 入口和未使用依赖 by xiaoyumuxi · Pull Request #26 · Lithe-IDEA/Lithe-core-rust · GitHub
Open Graph Title: refactor(core): crate 统一放到 rust/crates/,删除社区命令、wasm 入口和未使用依赖 by xiaoyumuxi · Pull Request #26 · Lithe-IDEA/Lithe-core-rust
X Title: refactor(core): crate 统一放到 rust/crates/,删除社区命令、wasm 入口和未使用依赖 by xiaoyumuxi · Pull Request #26 · Lithe-IDEA/Lithe-core-rust
Description: 关联 用户要求:整理 Core 的目录,并把 crate 拆小,方便并行编译。这个 PR 是第 0 步,只整理目录、删除已失效的代码,不拆分任何模块。基础层的拆分(protocol、diff、process、network、terminal、github,以及 core-rules 扩充)在后续 PR 里做。 处理 1lck/Lithe-IDEA#1796 的第 1–3 项(无用导入和死代码),以及 1lck/Lithe-IDEA#1789 中 forward_slash_path 未使用的那一条。 本次新建的债务 Issue:1lck/Lithe-IDEA#1863(lithe-remote 缺文档)、1lck/Lithe-IDEA#1864(lithe-core 的 clippy 告警)、1lck/Lithe-IDEA#1865(已无发送方的 agent.* 日志事件)。 这个 PR 做什么 两个提交,可以分开看。 1. 删除社区命令、wasm 入口和未使用依赖(7ecfe2e) 改动 说明 删除 7 个 community.discourse.* 命令 auth.begin、auth.complete、auth.revoke、categories、search、topic、topics。实现、rust/fixtures/community/discourse-auth-v1.json、rust-core-api.md 和 application-boundary.md 中的对应章节一起删除。桌面端已不再调用这些命令。用户决定:社区相关的全部删除 lithe-core-rules 去掉 wasm 删除 wasm.rs、cdylib 和只给 wasm 用的 execute_json、is_rule_command。crate 只作为 rlib 链接进 Core,fixture 测试改为直接调用 execute lithe-core 删除未使用的依赖 reqwest、rsa、sha1、shell-words、toml_edit,以及只为 num-bigint-dig 设的 profile。Cargo.lock 减少约 500 行 修复编译警告 host_failure 显式处理 BACKEND_EXITED:常量和错误码 plugin.backend.exited 都保留,映射结果仍是 plugin.host.failed,按 1lck/Lithe-IDEA#1796 的建议处理,错误码仍一码一义。另外给 forward_slash_path 加上 #[cfg(any(windows, test))],收窄 network 的重导出,删除 workspace_status.rs 中未使用的测试导入 新增测试 unparseable_requests_fail_without_an_id:请求无法解析时,响应不带 id。原来这个行为由 core-rules 的 execute_json 测试覆盖,现在改由 Core 测试 2. crate 统一放到 rust/crates/(8a89a0f) 移动前后的目录: rust/ rust/ ├── lithe-ai/ ├── crates/ ├── lithe-core/ │ ├── ai/ ├── lithe-core-rules/ │ ├── core/ ├── lithe-git-host/ → │ ├── core-rules/ ├── lithe-ide-host/ │ ├── git-host/ ├── lithe-remote/ │ ├── ide-host/ ├── contracts/ │ └── remote/ ├── fixtures/ ├── contracts/ └── logging/ ├── fixtures/ └── logging/ 目录名是包名去掉 lithe- 前缀,包名不变,cargo -p lithe-core 等命令照常可用。工作区成员改为 crates/*,以后新增的 crate 放进去就会自动加入工作区。 contracts/、fixtures/、logging/ 和 target/ 的位置不变,桌面端 LITHE_CORE_FIXTURE_DIR、LITHE_PLUGIN_CONTRACT_DIR 指向的路径不受影响。 路径引用随之更新:Cargo 路径依赖、SDK e2e 的 [[test]] 路径和 sdk-e2e.mjs、三个 SDK 示例协议文件里的 fixture 路径注释、rust/contracts/ 和 shared/plugins/ 文档里的源码路径、rust/fixtures/debug/v1-baseline.json 里的 34 处源码位置,以及 README 的目录表(中英文都加了 rust/crates/、rust/contracts/、rust/fixtures/、rust/logging/ 四行)。 C 头文件位置变为 rust/crates/core/include/lithe_core.h。C ABI 本身不变。 注释门禁 scripts/rust-core/verify-rust-core-comments.sh 改为遍历 rust/crates/*/Cargo.toml,不再手写 crate 列表。新 crate 放进 rust/crates/ 后会自动接受检查。 原来 rustdoc -D missing_docs 只检查 lithe-core、lithe-core-rules 和 lithe-ai。扩大范围后发现了下面三处缺口: lithe-git-host、lithe-ide-host 缺少文档,这个 PR 已补齐。 6 个文件里共有 21 条中文 log-exempt 注释,这个 PR 已改成英文;豁免类别名使用英文标签 Expected absence:、User cancellation:、Same failure already recorded:。 lithe-remote 有 404 处公开项缺文档,数量太多,不适合在目录整理的 PR 里补。脚本里新增一份显式名单 missing_docs_pending,名单上只有 lithe-remote,并注明 Issue 1lck/Lithe-IDEA#1863。名单上的 crate 只跳过 missing_docs,链接检查和词法检查照常进行。Issue 完成后从名单中删除。 scripts/rust-core/README.md 同步说明这份名单的用法。 其他: 给 lithe-ide-host 的 Cargo.toml 补上 description。 search_index 测试的权限写法从 0 改成八进制 0o000。原写法触发 clippy 的 deny 级 lint non_octal_unix_permissions。 不动的部分 命令名(删除的社区命令除外)、C ABI、JSON 字段、错误码都不变。 没有拆分或合并任何模块,没有改动任何 crate 的依赖关系(删除未使用依赖除外)。 CI 工作流不变。 桌面端(1lck/Lithe-IDEA)跟进 这个 PR 合入后,从最新 preview 开分支,在同一个 PR 里完成: scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION 升到包含这个 PR 的 commit;第 145 行的头文件路径改为 rust/crates/core/include/lithe_core.h。不改这一行,升级固定版本后桌面构建会失败。 desktop/internal/core/desktop_go_test.go:128:测试构造的头文件路径同步修改。 desktop/internal/core/errors.go:9:注释中的 rust/lithe-core/src/protocol/error.rs 改为新路径。 scripts/resources/worktree-resources.json 及其测试中的 rust/lithe-core/src/diagnostics/catalog_generated.rs、docs/ci-builds.md 中的 rust/lithe-core/、rust/lithe-remote/ 路径;develop-lithe Skill 及 references/logging.md 中的 Core 源码路径。 删除社区相关的功能矩阵条目和 docs/viva-migration.md 中关于社区的段落。 验证 cargo fmt --all --check:通过。 scripts/rust-core/verify-rust-core-comments.sh:通过(lithe-remote 按上面的名单跳过 missing_docs)。 node shared/plugins/scripts/verify-docs.mjs:通过。 node shared/plugins/scripts/sdk-e2e.mjs:Node、Java、Rust 三个 SDK 和构建场景全部通过。 cargo check -p lithe-remote --no-default-features --features server:通过,远端服务器的构建方式不受影响。 cargo check --workspace --all-targets:第一个提交单独构建时没有警告。 cargo test --workspace:1933 passed / 0 failed,rustc 没有警告。原来是 1937 个,减去随社区命令删除的 5 个,加上新增的 1 个。 cargo clippy --workspace --all-targets:86 条告警都是原有代码产生的,这个 PR 没有新增告警。lithe-core 的 84 条记在 1lck/Lithe-IDEA#1864;lithe-git-host、lithe-core-rules 各剩 1 条,记在 1lck/Lithe-IDEA#1789。
Open Graph Description: 关联 用户要求:整理 Core 的目录,并把 crate 拆小,方便并行编译。这个 PR 是第 0 步,只整理目录、删除已失效的代码,不拆分任何模块。基础层的拆分(protocol、diff、process、network、terminal、github,以及 core-rules 扩充)在后续 PR 里做。 处理 1lck/Lithe-IDEA#1796 的第 1–3 项(无用导入和死代...
X Description: 关联 用户要求:整理 Core 的目录,并把 crate 拆小,方便并行编译。这个 PR 是第 0 步,只整理目录、删除已失效的代码,不拆分任何模块。基础层的拆分(protocol、diff、process、network、terminal、github,以及 core-rules 扩充)在后续 PR 里做。 处理 1lck/Lithe-IDEA#1796 的第 1–3 项(无用导入和死代...
Opengraph URL: https://github.com/Lithe-IDEA/Lithe-core-rust/pull/26
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:17d5448e-7d93-c762-ca9d-49dec83aa4c8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E3C8:1F1A6F:DE71D:136FD0:6B072718 |
| html-safe-nonce | 09d949c1ab83d1f6f3e449f9b7d8eaa714f1812cfec63e1b2722a9b2889b0178 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0M4OjFGMUE2RjpERTcxRDoxMzZGRDA6NkIwNzI3MTgiLCJ2aXNpdG9yX2lkIjoiMTE5MDI4MTI0OTM2MTk2Mjc3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1f6ed03829387228041c73e25bce440cef6327164268ee84621386dd299c13a5 |
| hovercard-subject-tag | pull_request:5299775881 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/Lithe-IDEA/Lithe-core-rust/pull/26/files |
| twitter:image | https://avatars.githubusercontent.com/u/145102356?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/145102356?s=400&v=4 |
| og:image:alt | 关联 用户要求:整理 Core 的目录,并把 crate 拆小,方便并行编译。这个 PR 是第 0 步,只整理目录、删除已失效的代码,不拆分任何模块。基础层的拆分(protocol、diff、process、network、terminal、github,以及 core-rules 扩充)在后续 PR 里做。 处理 1lck/Lithe-IDEA#1796 的第 1–3 项(无用导入和死代... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5a20fe9aa5e45c6df9328a5ec3f167a7805856126d8bf72d810541ca01962ef9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/Lithe-IDEA/Lithe-core-rust git https://github.com/Lithe-IDEA/Lithe-core-rust.git |
| octolytics-dimension-user_id | 340144206 |
| octolytics-dimension-user_login | Lithe-IDEA |
| octolytics-dimension-repository_id | 1449354685 |
| octolytics-dimension-repository_nwo | Lithe-IDEA/Lithe-core-rust |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1449354685 |
| octolytics-dimension-repository_network_root_nwo | Lithe-IDEA/Lithe-core-rust |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6ce961d9a663a99bc4bcab9fd6ac5cca54bd6fcc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width