Conversation
Agent-Logs-Url: https://github.com/version-fox/vfox/sessions/f9ac9663-b05f-43e1-aa20-4abf8b1e5255 Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Agent-Logs-Url: https://github.com/version-fox/vfox/sessions/f9ac9663-b05f-43e1-aa20-4abf8b1e5255 Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #661 +/- ##
==========================================
+ Coverage 24.09% 24.16% +0.07%
==========================================
Files 82 83 +1
Lines 7084 7104 +20
==========================================
+ Hits 1707 1717 +10
- Misses 5201 5209 +8
- Partials 176 178 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates SDK version resolution so that activate/env prefer the highest-priority installed configured version across scopes, instead of letting a higher-priority but missing version effectively remove the SDK from PATH.
Changes:
- Added
VfoxTomlChain.GetToolConfigsByPriority(name)to retrieve per-scope tool configs in priority order (Project → Session → Global). - Introduced shared installed-aware resolution helper (
resolveInstalledToolConfig) and integrated it intoactivateandenvsymlink/env generation paths. - Added unit test coverage for ordered per-scope config retrieval in
VfoxTomlChain.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/env/vfox_toml_chain.go | Adds ScopedToolConfig and GetToolConfigsByPriority for ordered multi-scope lookup. |
| internal/env/vfox_toml_chain_test.go | Adds test verifying priority ordering of tool configs across scopes. |
| cmd/commands/tool_resolution.go | New helper to pick the first installed configured version by scope priority. |
| cmd/commands/env.go | Switches envFlag path to installed-aware resolution (no longer trusts merged version when missing). |
| cmd/commands/activate.go | Switches activation symlink/env generation to installed-aware resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@aooohan 这个问题是: then you cannot use go in this folder, unless you install go specific version 如果您全局安装了Go 1.26,然后打开一个包含 .vfox.toml 文件[tools] golang = "1.24.0" 的工作区,那么在这个文件夹中无法使用 go,除非执行 vfox use |
这个对于golang倒是没问题,但对于java这种兼容性极差的版本gap,会有问题呀。 |
|
但是这个不对齐以前的表现或者其他工具的表现诶 |
那既然这样,就合并吧。 |
A project-local
.vfox.tomlentry (e.g.golang = "1.24.0") currently overrides global config even when that version is not installed, which can removegofrom PATH inside the workspace. This change keeps scope priority while skipping uninstalled candidates and selecting the highest-priority installed configured version.Resolution behavior: prefer installed config by scope order
Project -> Session -> Global) and pick the first installed runtime.Activation/env pipeline integration
activateandenvcommand paths to use installed-aware resolution before symlink/env generation.Chain API support for ordered lookup
VfoxTomlChainwithGetToolConfigsByPriority(name)to return all scope configs for a tool from high to low priority.Targeted coverage