`overrideFeatureInstallOrder` gets confused when higher-priority features have dependencies
@v-Kaniska244 已经在做这个了。
开始于 2026年4月20日。
评估
这个 Issue 还没有评估数据。
描述
I wanted to install features in a specific order, and used overrideFeatureInstallOrder to do that. I was surprised when the feature I wanted to install last installed first!
I have a minimal reproduction at https://github.com/dgholz/devcontainer-install-override
In the devcontainer.json file, I have:
{
"image": "mcr.microsoft.com/devcontainers/base:trixie",
"features": {
"./features/use-tr": {},
"./features/remove-tr": {}
},
"overrideFeatureInstallOrder": [
"./features/use-tr",
"./features/remove-tr"
]
}
But use-tr has a dependency on the common feature, and remove-tr does not. So when computeDependsOnInstallationOrder runs, it gets tripped up by
https://github.com/devcontainers/cli/blob/997a2db1ec28eacfb718d07e7741dbd57af59564/src/spec-configuration/containerFeaturesOrder.ts#L625
use-tr gets excluded, and remove-tr has round priority 1 so gets installed before common (which has round priority 0)
The fix is to either set the round priority transitively (so common would get round priority 2 from use-tr); or to reverse the calculated priority ordering, so features with no dependencies would be installed first.
- 主要语言
- TypeScript
- 星标
- 3k
- 派生
- 461
- 平均合并
- 13 小时 17 分钟
- 30 天内合并 PR
- 6
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
devcontainers/cli 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
devcontainers/cli#1203 ·
-
难度 1/5 1-3 小时 新手友好度 68/100
devcontainers/cli#1178 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 68/100
devcontainers/cli#1301 ·
-
难度 3/5 1-2 天 新手友好度 74/100
devcontainers/cli#1300 ·
-
难度 5/5 一周以上 新手友好度 35/100
devcontainers/cli#1298 ·
查看 devcontainers/cli 的全部 Issue
相似的 Issue
-
Browser Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 85/100
getsentry/sentry-javascript#24577 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
agilepathway/label-checker#640 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
难度 1/5 1 小时以内 新手友好度 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
难度 2/5 1-3 小时 新手友好度 76/100
anomalyco/models.dev#7701 ·