René's URL Explorer Experiment


Title: [Bug] 构建面板中 uv / conda / Ruff 构建模型加载失败(modelSource 为空落入 providerModel,且 Ruff 因 pyproject.toml 误检) · Issue #19 · Lithe-IDEA/lithe-plugin-python · GitHub

Open Graph Title: [Bug] 构建面板中 uv / conda / Ruff 构建模型加载失败(modelSource 为空落入 providerModel,且 Ruff 因 pyproject.toml 误检) · Issue #19 · Lithe-IDEA/lithe-plugin-python

X Title: [Bug] 构建面板中 uv / conda / Ruff 构建模型加载失败(modelSource 为空落入 providerModel,且 Ruff 因 pyproject.toml 误检) · Issue #19 · Lithe-IDEA/lithe-plugin-python

Description: 现象 在 Lithe Desktop(0.8.17)安装 Python Support(v1.2.1,v1.0.0–v1.2.1 清单一致)后,打开一个标准的 uv Python 项目(如仅含 pyproject.toml、uv.lock 与 .venv/,本机 PATH 已安装 uv 但未全局安装 ruff,且项目未使用 Ruff),右侧「构建」工具窗口中: Python 构建系统正常加载; 额外误检出 Ruff 构建系统,且报错: 构建模型加载失败:未找到此构建系统...

Open Graph Description: 现象 在 Lithe Desktop(0.8.17)安装 Python Support(v1.2.1,v1.0.0–v1.2.1 清单一致)后,打开一个标准的 uv Python 项目(如仅含 pyproject.toml、uv.lock 与 .venv/,本机 PATH 已安装 uv 但未全局安装 ruff,且项目未使用 Ruff),右侧「构建」工具窗口中: Python 构建系统正常加载...

X Description: 现象 在 Lithe Desktop(0.8.17)安装 Python Support(v1.2.1,v1.0.0–v1.2.1 清单一致)后,打开一个标准的 uv Python 项目(如仅含 pyproject.toml、uv.lock 与 .venv/,本机 PATH 已安装 uv 但未全局安装 ruff,且项目未使用 Ruff),右侧「构建」工具窗口中: Python 构建系统正常加载...

Opengraph URL: https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug] 构建面板中 uv / conda / Ruff 构建模型加载失败(modelSource 为空落入 providerModel,且 Ruff 因 pyproject.toml 误检)","articleBody":"## 现象\n\n在 Lithe Desktop(`0.8.17`)安装 Python Support(`v1.2.1`,`v1.0.0`–`v1.2.1` 清单一致)后,打开一个标准的 `uv` Python 项目(如仅含 `pyproject.toml`、`uv.lock` 与 `.venv/`,本机 `PATH` 已安装 `uv` 但未全局安装 `ruff`,且项目未使用 Ruff),右侧「构建」工具窗口中:\n\n- `Python` 构建系统正常加载;\n- 额外误检出 `Ruff` 构建系统,且报错:\n  `构建模型加载失败:未找到此构建系统可用的构建程序。`\n- `uv` 构建系统报错:\n  `构建模型加载失败:plugin.build.unavailable: uv reads its model without a command; use build.decodeModel.`\n- 同理,`conda` 构建系统在含 `environment.yml` 的项目中也会触发同样的模型加载失败,导致 `uv` / `conda` / `ruff` 声明的任务(`uv sync`、`uv lock`、`conda env update`、`ruff check`、`ruff format`)均无法在构建树中正常展开使用。\n\n## 根因分析\n\n问题由**宿主对无 `model` 构建系统的处理缺口**与**本插件清单声明及端到端测试缺口**共同导致:\n\n### 1. `uv` / `conda` / `ruff` 未声明 `model`(`modelSource: null`),宿主走入 `providerModel` 触发 `plugin.build.unavailable`\n\n- `io.github.lithe-idea.python-support/plugin.json` 中,主构建系统 `python` 声明了 `\"model\": { \"source\": \"provider\" }`,而 `uv`(L781–816)、`conda`(L818–853)、`ruff`(L855–914)均未声明 `model` 字段。\n- Core 契约允许构建系统省略 `model`(`Lithe-core-rust` `rust/crates/build/src/manifest/model.rs:224`),此时:\n  - `build.detect`(`detect.rs:64-69, 119-147`)返回 `\"modelSource\": null`,且不附带静态 `\"model\"`;\n  - `build.modelTree`(`tree.rs:526`)已支持空模型(`projects: []` 时将 `workspace` 作用域任务直接挂在实例根节点下)。\n- 但桌面宿主 `1lck/Lithe-IDEA` 的 `desktop/internal/workbench/build.go` 未处理 `ModelSource == \"\"`(`modelSource: null`):\n  1. `loadBuildSystems`(`build.go:863`)仅在 `detected.Model` 非空时置 `instance.modelLoaded = true`,导致无 `model` 的实例保持 `modelLoaded = false`;\n  2. `finishBuildDetection` / `loadTitleRunConfigs` 随后对所有 `!modelLoaded` 实例调用 `loadBuildModel` -> `buildModel`(`build.go:979-984`);\n  3. `buildModel` 仅判断 `if instance.ModelSource == \"command\"`,其余一律落入 `a.providerModel(...)`;\n  4. `providerModel`(`build.go:1147, 1155`)先执行 `resolveBuildExecutable`:\n     - 若可执行文件不存在(如本机未装 `ruff`),直接报 `未找到此构建系统可用的构建程序。`;\n     - 若可执行文件存在(如本机已装 `uv`),继续调用 `kernel.PlanBuildModel`,被 Core `model_plan`(`plans.rs:971-987`)以 `plugin.build.unavailable: uv reads its model without a command; use build.decodeModel.` 拒绝(即使装了全局 `ruff` 或 `conda`,通过可执行文件探测后也会在同一处报 `plugin.build.unavailable`)。\n\n### 2. `ruff` 构建系统把 `pyproject.toml` 列入 `detection.markers`,导致所有现代 Python 项目误检出 Ruff\n\n- `plugin.json:858` 将 `ruff.detection.markers` 声明为 `[\"ruff.toml\", \".ruff.toml\", \"pyproject.toml\"]`。\n- `build.detect` 仅按文件名匹配存在性,不解析文件内容是否有 `[tool.ruff]`。几乎所有 PEP 621 / `uv` / Poetry / Hatch 项目都包含 `pyproject.toml`,导致完全不使用 Ruff 的项目也会常驻出现一个报错或无用的 `Ruff` 构建系统分组。\n\n### 3. `ruff.invocation.executables` 仅查找全局 `PATH`,忽略项目虚拟环境(`.venv` / `venv` / `.conda`)\n\n- `plugin.json:860-863` 中 `ruff.invocation.executables` 仅声明了 `{ \"kind\": \"command\", \"command\": \"ruff\" }`。\n- Python / `uv` 项目通常将 `ruff` 作为开发依赖安装在项目虚拟环境中(`.venv/bin/ruff` 或 Windows `.venv/Scripts/ruff.exe`),而非全局 `PATH`。仅查 `command` 会导致项目已安装 `ruff` 时仍报找不到构建程序。\n\n### 4. 工作台端到端测试未校验 `uv` / `conda` / `ruff` 的模型加载与任务树状态\n\n- `e2e/host/desktop/internal/workbench/python_support_plugin_e2e_test.go:612-627` 只断言了 `DetectBuildSystems` 返回 `[conda python ruff uv]`,随后仅对 `\"python\"` 调用了 `PlanBuildModel`;\n- `e2e/host/desktop/internal/workbench/python_project_workflow_e2e_test.go:58, 174-183` 虽然写入了 `environment.yml` 触发 `conda` 检测,但断言时只过滤了 `candidate.BuildSystemID == \"python\"`,漏检了同工作区旁路实例的 `modelError`;\n- `docs/feature-matrix.md` 第 26 行将 `uv` / `conda` / `ruff` 标为了 `✅ 已验证`,与真实工作台表现不符。\n\n## 复现步骤\n\n1. 准备一个含 `pyproject.toml` 与 `uv.lock` 的最小 Python 项目(不创建 `ruff.toml`,不在全局 `PATH` 安装 `ruff`,本机 `PATH` 安装 `uv`)。\n2. 在 Lithe Desktop 中启用 Python Support 插件并打开该项目(信任工作区)。\n3. 打开右侧「构建」面板,查看 `Ruff` 与 `uv` 两个构建系统分组下的状态提示。\n\n## 修复建议\n\n1. **宿主侧配合(`1lck/Lithe-IDEA`)**:在 `desktop/internal/workbench/build.go`(`loadBuildSystems`、`loadBuildModelWith`、`reloadBuildModel`)及 `settings_plugin_effects.go`(`reloadPluginBuildModels`)中,对 `instance.ModelSource == \"\"`(`modelSource: null`)的构建系统直接标记 `modelLoaded = true`(使用空 `core.BuildModel{}` 交由 `build.modelTree` 渲染 `workspace` 级任务,不在打开项目时调 `providerModel` / `PlanBuildModel`)(或由插件侧评估是否为需要兼容旧宿主的构建系统提供模型来源)。\n2. **收敛 `ruff` 检测标记(`plugin.json`)**:从 `ruff.detection.markers` 中移除宽泛的 `\"pyproject.toml\"`,仅保留专有配置文件 `[\"ruff.toml\", \".ruff.toml\"]`(若后续需要将 `[tool.ruff]` 纳入支持,应避免在无 Ruff 配置的普通 `pyproject.toml` 项目中误检并报错)。\n3. **补齐虚拟环境可执行文件候选(`plugin.json`)**:为 `ruff.invocation.executables` 在 `{ \"kind\": \"command\", \"command\": \"ruff\" }` 之前按平台补充 `.venv`、`venv`、`.conda` 下的 `projectFile` 候选(macOS/Linux `bin/ruff`,Windows `Scripts/ruff.exe`,配合 `pyvenv.cfg` / `conda-meta/history` 的 `requires`)。\n4. **补齐工作台 E2E 与功能矩阵**:在 `e2e/host/desktop/internal/workbench/` 中覆盖真实工作台打开含 `uv.lock` / `environment.yml` / `ruff.toml` 项目后的构建树渲染,断言各实例 `modelLoaded == true`、`modelError == \"\"` 且任务节点可见,并同步更新 `e2e/host/lithe-host.json` 与 `docs/feature-matrix.md`。\n","author":{"url":"https://github.com/xiaoyumuxi","@type":"Person","name":"xiaoyumuxi"},"datePublished":"2026-11-24T15:18:46Z","url":"https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3d97a4f1-335b-58f4-d0ca-93eaa03d3e0e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA37A:23E66D:7EC4A6:AF010C:6B070DEF
html-safe-noncee1519855fa6c06fdfd87ebe3ed7023f98d465305db21f1c420b925c6af6a4b09
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzdBOjIzRTY2RDo3RUM0QTY6QUYwMTBDOjZCMDcwREVGIiwidmlzaXRvcl9pZCI6IjQ3OTA0ODIwMzQxMjY5NDk4NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7f0d44c535cf0d1666cdf40a6a729df7daa55fd63919a661279ed4e1121fd408
hovercard-subject-tagissue:6585117688
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Lithe-IDEA/lithe-plugin-python/19/issue_layout
twitter:imagehttps://opengraph.githubassets.com/15b9337939a7b2cc35778eee024a49f9b8c745de73dcc91e3eed84d40b93e3e1/Lithe-IDEA/lithe-plugin-python/issues/19
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/15b9337939a7b2cc35778eee024a49f9b8c745de73dcc91e3eed84d40b93e3e1/Lithe-IDEA/lithe-plugin-python/issues/19
og:image:alt现象 在 Lithe Desktop(0.8.17)安装 Python Support(v1.2.1,v1.0.0–v1.2.1 清单一致)后,打开一个标准的 uv Python 项目(如仅含 pyproject.toml、uv.lock 与 .venv/,本机 PATH 已安装 uv 但未全局安装 ruff,且项目未使用 Ruff),右侧「构建」工具窗口中: Python 构建系统正常加载...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamexiaoyumuxi
hostnamegithub.com
expected-hostnamegithub.com
None9aaa1abe1aaef39a8543ab08df7a776c3243275815d741d29afa7b02148ca05e
turbo-cache-controlno-preview
go-importgithub.com/Lithe-IDEA/lithe-plugin-python git https://github.com/Lithe-IDEA/lithe-plugin-python.git
octolytics-dimension-user_id340144206
octolytics-dimension-user_loginLithe-IDEA
octolytics-dimension-repository_id1462371131
octolytics-dimension-repository_nwoLithe-IDEA/lithe-plugin-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1462371131
octolytics-dimension-repository_network_root_nwoLithe-IDEA/lithe-plugin-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c43783771de038e2c401dd343799000e8d1253
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/Lithe-IDEA/lithe-plugin-python/issues/19#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLithe-IDEA%2Flithe-plugin-python%2Fissues%2F19
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLithe-IDEA%2Flithe-plugin-python%2Fissues%2F19
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Lithe-IDEA%2Flithe-plugin-python
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-python/issues/19
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-python/issues/19
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-python/issues/19
Lithe-IDEAhttps://github.com/Lithe-IDEA
lithe-plugin-pythonhttps://github.com/Lithe-IDEA/lithe-plugin-python
Codehttps://github.com/Lithe-IDEA/lithe-plugin-python
Issues1 (1)https://github.com/Lithe-IDEA/lithe-plugin-python/issues
Pull requestshttps://github.com/Lithe-IDEA/lithe-plugin-python/pulls
Actionshttps://github.com/Lithe-IDEA/lithe-plugin-python/actions
Projectshttps://github.com/Lithe-IDEA/lithe-plugin-python/projects
Security and qualityhttps://github.com/Lithe-IDEA/lithe-plugin-python/security
Insightshttps://github.com/Lithe-IDEA/lithe-plugin-python/insights
https://github.com/Lithe-IDEA/lithe-plugin-python
New issuehttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19
New issuehttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19
[Bug] 构建面板中 uv / conda / Ruff 构建模型加载失败(modelSource 为空落入 providerModel,且 Ruff 因 pyproject.toml 误检)https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19#top
bughttps://github.com/Lithe-IDEA/lithe-plugin-python/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/xiaoyumuxi
xiaoyumuxihttps://github.com/xiaoyumuxi
on Nov 24, 2026https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19#issue-6585117688
xiaoyumuxihttps://github.com/xiaoyumuxi
bughttps://github.com/Lithe-IDEA/lithe-plugin-python/issues?q=state%3Aopen%20label%3A%22bug%22
on Nov 24, 2026https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19#event-37146253166
Sign up for freehttps://github.com/signup?return_to=https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19
Sign in to commenthttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-python/issues/19
bughttps://github.com/Lithe-IDEA/lithe-plugin-python/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.