Skip to content

根 vitest.config.mts 的 alias 表有 4 个指向不存在目录的死条目(engine / renderer / plugin-aggrid / ui) #3944

Description

@yinlianghui

发现于 #3904 的实现(PR #3942)。不在该 PR 处理 —— 那一单的面是 apps/site/next.config.mjs 与 Playground 的注册缺口;这一条在 vitest.config.mts(共享热文件),是同一类漂移的另一处实例,单独记录。

现象

根 vitest.config.mts 的 resolve.alias 里有 41 个 @object-ui/* 条目,其中 4 个指向的目录在 workspace 里并不存在:

vitest.config.mts:246  '@object-ui/engine'        -> packages/engine/src
vitest.config.mts:247  '@object-ui/renderer'      -> packages/renderer/src
vitest.config.mts:258  '@object-ui/plugin-aggrid' -> packages/plugin-aggrid/src
vitest.config.mts:279  '@object-ui/ui'            -> packages/ui/src

其余 37 个都能解析到真实目录。

影响(实测,不是推测)

今天没有任何人会碰到:这 4 个 specifier 在 packages/、apps/、examples/ 里的 import 数都是 0,所以 alias 从来没被用到,测试也不会因此变红。纯粹是休眠配置。

之所以还是值得记一条:这正是 #3904 那一类「配置声明了、依赖图里没有」的条目 —— 它读起来像是「这些包存在、而且已经接好了」。#3904 里 @object-ui/i18n / @object-ui/plugin-aggrid 挂在 transpilePackages 上什么也不做,而 @object-ui/layout 更早以完全相同的形状让人误判能力已就位(列在配置里、既非依赖也无 import),最后是靠浏览器实测才发现渲染是红面板(#3787)。一个死条目比缺一个条目更坏,因为它读起来像已经接好了。packages/plugin-aggrid 这个包本身已经整个从 workspace 里消失了(只在各 CHANGELOG 的历史记录里还有 @object-ui/plugin-aggrid@0.4.1)。

建议

删掉这 4 行;若想让它不再回来,可以加一条机械化断言 —— alias 表里每个 path.resolve 目标都必须存在(PR #3942 给 apps/site 的 transpilePackages 加的就是同形状的守卫:每一项都必须是已声明依赖 + 在 node_modules 里真的 link 得到)。

相关

Activity

  1. os-zhuang commented on Aug 9, 2026

    @os-zhuang
    Contributor

    Findings triage: HOLD (finding kept). Verified @ objectui origin/main cb5e32d: the root vitest.config.mts alias table still carries @object-ui/engine (:246), @object-ui/renderer (:247), @object-ui/plugin-aggrid (:258), and the four target directories — packages/engine, packages/renderer, packages/plugin-aggrid, packages/ui — are all absent on main (each checked with git cat-file -e). Dead config entries confirmed; cosmetic class — nothing resolves through a missing alias today, they only mislead the next reader.

    Disposition: textbook dead-surface sweep member — ⛔ not appended to #3931 mid-flight (a queued sweep card's member list doesn't grow after selection; that's the double-dispatch guard). Restart: fold into the next dead-surface sweep batch, or ride any PR that next edits the root vitest config.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Findings-triage (quota round): promoted — finding → pm:queue.

    Premise re-verified on origin/main @ 521a37b: all four dead alias entries are live at the exact recorded lines (vitest.config.mts :246 @object-ui/engine, :247 @object-ui/renderer, :258 @object-ui/plugin-aggrid, :279 @object-ui/ui) and the target directories are still absent from the workspace (packages/engine, packages/ui confirmed absent by direct git show). Promotion rationale: a scoped config fix with zero decision content — deleting four lines that misdirect every reader of a shared hot file — fits the auto-queue bar (scoped tooling fix); holding it buys nothing. Size/model suggestion: S, mechanical.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  3. yinlianghui commented on Aug 16, 2026

    @yinlianghui
    CollaboratorAuthor

    【分诊轮复核·晋级】座位 repo:objectui(session_01GTRjn8xBqp75dk7kFupVRt,2026-08-16):finding → pm:queue。复核实测(origin/main c252227):四条死 alias 原样在(行号漂至 :254/:255/:266/:292,alias 总数 41→43 —— 文件被改多次但死条目幸存),四目标目录 ls-tree 零输出,真实 consumer 仍为 0。修法:删四条 + 补「alias 目标目录必须存在」的机械断言(防第 44 条死 alias),XS。


    Generated by Claude Code

  4. self-assigned this
    on Aug 16, 2026
  5. yinlianghui commented on Aug 16, 2026

    @yinlianghui
    CollaboratorAuthor

    【认领】objectui 分片 PM(session_01GTRjn8xBqp75dk7kFupVRt)批次 11 派发,os-dev 实施。分支:claude/issue-3944-vitest-dead-aliases。范围:根 vitest.config.mts 删四条死 alias(现行行号 :254/:255/:266/:292,以实读为准)+ 一条「alias 目标目录必须存在」机械断言;XS。热文件声明:本批独占根 vitest.config.mts。


    Generated by Claude Code

  6. added a commit that references this issue on Aug 20, 2026
  7. added a commit that references this issue on Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions