Repository navigation
feat: link existing SDKs, add vfox doctor, aliases and path.mode - #736
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #736 +/- ##
===========================================
+ Coverage 34.99% 51.05% +16.06%
===========================================
Files 95 111 +16
Lines 6704 8236 +1532
===========================================
+ Hits 2346 4205 +1859
+ Misses 4045 3609 -436
- Partials 313 422 +109 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| ### Let vfox's versions win over the system's | ||
|
|
||
| Run this once, after hooking `vfox` into your shell: | ||
|
|
||
| ```shell | ||
| vfox config path.mode baseline | ||
| ``` | ||
|
|
||
| Without it, the system directories that macOS and Windows put in front of `vfox`'s can keep winning: `vfox use` says it | ||
| switched, but `node` or `java` is still the system's. With `baseline`, `vfox` puts its directories before everything | ||
| that was already in `PATH` when it was activated, and only what is added afterwards, such as a Python virtualenv you | ||
| activate later, stays in front of it. Open a new terminal afterwards. If you rely on a directory of your own being in | ||
| front of `vfox`'s, list it in `path.preserve`; see [PATH Order Settings](./configuration.md#path-order-settings). | ||
|
|
||
| ::: info 📌 The default will change | ||
| `baseline` is going to become the default of `path.mode` in a future release. Until then the default is `legacy`, which | ||
| leaves `PATH` the way `vfox` 1.0.x did. Setting `baseline` now means that upgrading will not change anything for you. | ||
| ::: | ||
|
|
There was a problem hiding this comment.
CC @aooohan . What do you think of this plan? Could you help review it? I actually want to change the default value in another PR.
There was a problem hiding this comment.
That’s a pretty big change! I’ll take a look.
`vfox list` and CheckRuntimeExist follow symlinks and junctions (os.Stat), but GetRuntimePackage asked DirEntry.IsDir(), which is false for them. An SDK linked into the install path by hand was therefore listed as installed while `vfox info` printed "notfound" and `vfox use` failed with "runtime not found" (version-fox#669). Ask the file system about the target instead, so that every way of asking whether a version is installed gives the same answer. A link whose target is gone is still not installed, for all of them. `vfox info <sdk>@<version>` also tells where the SDK lives: - `{{.Home}}` in --format templates is the main runtime directory, the one to point JAVA_HOME and the like at (version-fox#706). `{{.Path}}` keeps meaning the version directory, so existing scripts are not affected. - `--json` prints the version directory, the main runtime, the additional runtimes and what the plugin's EnvKeys puts in the environment. It works for `vfox info <sdk>` as well.
vfox treated an installed SDK as a directory name and nothing more: it could not tell who owns the files, and it had no way to use an SDK that is already on the machine. Receipt. Every installation now leaves `.vfox-receipt.json` in its version directory, next to the payload: what was asked for, the sources (URLs without credentials and query, never request headers), the vfox and plugin versions, and whether vfox owns the files. It is written atomically after PostInstall and before the `.installing` marker is removed. It only informs later checks: failing to write it never fails the installation, and a version without one is a legacy installation, for which every check that needs a baseline stays silent. Link. `vfox link <sdk>@<version> <path>` registers an SDK that is already there (a system JDK, an IDE download, a CI tool cache; version-fox#706, version-fox#669). Nothing is downloaded or copied: the version directory holds a link to <path>, and the version name is used as written, so `java@17-system` stays `17-system`. No new hook is needed to validate it: the directories the plugin's EnvKeys puts on PATH must hold commands (env.ListExecutables, PATHEXT-aware on Windows), or the link is refused. `--force` points an already linked version somewhere else; it never replaces a version vfox installed. A linked version is a version like any other (`install` is a no-op, `use`, `env` and `info` work), except that vfox does not own its files: - `uninstall` removes the link and the receipt, never the target, and does not run PreUninstall. A link whose target is gone can still be removed, and a link made by hand with `ln -s` counts as linked. - `list` marks it: `17-system (linked -> /usr/lib/jvm/...)`. - `info` reports the origin and the target, and `info --json` the receipt.
pnpm puts its own `node` in front of the one vfox exports, and `vfox use` says nothing about it (version-fox#732, version-fox#337). Plugins work around this in Lua, each with its own wording, and the user cannot ask for it. The core now owns the whole chain; plugins only provide facts. - `vfox doctor [<sdk>[@<version>]] [--json]` runs the checks. It exits with status 1 only when a finding of severity error is not ignored. `--json` prints {"ok": ..., "findings": [...]}. - `vfox use` runs the fast checks for the version it just selected and prints the warnings. It never fails because of them. - A finding has a stable ID, a severity, hints that explain it and commands that fix it. This commit has path.shadowed, path.not-activated, sdk.link-dangling, sdk.payload-empty, sdk.envkeys-failed, sdk.install-interrupted, sdk.plugin-missing and plugin.incompatible. - path.shadowed compares the commands the version puts on PATH with the executables in front of vfox's directories, in the order `vfox env` is going to export, so it can speak before the shell has picked the version up. It names the executable that wins. An active virtualenv or conda environment shadows on purpose and is only a notice. Where any other directory comes from is not known yet. - `diagnostics.onUse: false` in config.yaml turns the check after `use` off. `diagnostics.ignore` silences findings by `<id>[:<sdk>[@<version>]]`. - A plugin can explain a shadowing executable with declarative metadata, `PLUGIN.shadowHints = {{match = "pnpm", message = "...", url = "..."}}`, matched against the path of the winner. Detection, display and exit codes stay in the core. Refs version-fox#732, version-fox#337 (diagnosis only).
`flutter upgrade`, `downgrade` and `channel` rewrite an SDK inside the
directory vfox installed it into. vfox kept no record of what it had
installed, so there was nothing to compare with.
Plugins can implement the optional `Fingerprint` hook, which returns
facts that identify an installation (`return {facts = {head = "9584c67"}}`).
It must only read, quickly and without network access. vfox records the
facts in the receipt when it installs or links a version, and asks again
in `vfox use` and `vfox doctor`. When a recorded fact differs or cannot
be read any more, sdk.drift says what changed and how to get back: a
warning, or only a notice for a linked SDK, which is not vfox's to
repair. Facts the plugin learned since are ignored. A hook that fails
makes `doctor` report sdk.fingerprint-failed and leaves `use` silent.
- `vfox install --reinstall <sdk>@<version>` replaces an installed
version with a fresh copy. The version has to be given exactly as it
is installed, a linked version is refused, and it cannot be combined
with --all. If the new installation fails the old one is gone, as with
any failed installation.
- `vfox doctor --adopt [<sdk>[@<version>]]` writes the receipts of
versions installed before receipts existed, taking their current state
as the baseline. It is explicit because doing it by itself would take
an SDK that has already drifted for the truth. Until then `doctor`
only mentions the missing receipt (sdk.no-receipt).
- The plugin development commands can run the hook as well.
vfox keeps every PATH entry in front of its own directories in front, so that a virtualenv activated later keeps winning. That cannot tell apart entries that mean different things: - directories the system put first: macOS path_helper, the Windows machine PATH (version-fox#337, version-fox#732), - a directory added after `vfox activate`, such as `pnpm setup`'s, - an environment the user activated later (version-fox#622). `vfox activate` now records the PATH it found, without vfox's own directories, in __VFOX_ORIG_PATH, once per shell session. A shell started from another shell records its own, and an IDE resolving its environment never gets it. `vfox env` only reads it, and a missing baseline means the old behavior. `path.mode` (config.yaml, or `vfox config path.mode <mode>`) decides what stays in front of vfox's directories: legacy everything, as in 1.0.x. This is the default. baseline what was added after activation, plus active virtualenv and conda directories. What was already in PATH when vfox was activated goes behind vfox's directories. aggressive only active virtualenv and conda directories and `path.preserve`. `path.preserve` lists directories that always stay in front; environment variables and a leading ~ are expanded. The output `vfox env` caches is keyed by the mode, so a change shows at the next prompt. The default stays `legacy`: nothing changes for anyone who does not set it. Making `baseline` the default is a one line change of EmptyPath in internal/config/path.go, for whoever decides it should be. `vfox doctor` and `vfox use` can now say where a shadowing directory comes from (inherited, added after activation, preserved) and which setting or startup file change would help. Refs version-fox#337, version-fox#732, version-fox#622.
Aliases (version-fox#670, version-fox#359). `vfox alias set <sdk> <alias> <version>`, `alias list` and `alias unset` give an installed version a short name. They are kept in the user's config.yaml (`aliases:`; the shared config's are used too) and resolved for what is typed on the command line only: `use`, `uninstall`, `info`, `exec` and `doctor`. They are never resolved for, or written to, a version file, so .vfox.toml always holds the real version and stays valid on other machines. - An installed version of the same name always wins over an alias, and `alias set` refuses a name that is an installed version or that is not a usable version name. - `list` shows the aliases, `uninstall` removes the ones that name the removed version, and `doctor` reports an alias whose version is gone (alias.dangling). Detect. A plugin can implement the optional `Detect` hook to list SDKs that are on the machine already (/usr/lib/jvm/*, $JAVA_HOME_*_X64, ...). `vfox link --detect <sdk>` shows what was found and links it after asking, or without asking with -y, which is required when not interactive. Nothing is downloaded; what is installed or linked already is skipped, with the reason. Refs version-fox#706 (CI use), version-fox#670, version-fox#359.
English and Simplified Chinese:
- usage: `vfox link`, `vfox doctor`, `vfox alias`, `install
--reinstall`, and `info`'s `{{.Home}}` and `--json`.
- configuration guide: `diagnostics`, `path.mode` / `path.preserve`
and `aliases`.
- FAQ: `use` switched but the old command still runs, using an SDK that
is already installed, and an SDK that changed after vfox installed it.
- plugin guides: the `Fingerprint` and `Detect` hooks and
`shadowHints`, and how to test them.
Quick Start and the READMEs now ask new installations to run
`vfox config path.mode baseline` right after hooking vfox into the
shell, so that the system directories macOS and Windows put in front of
vfox's stop winning. `legacy` stays the default; the Quick Start and the
configuration guide announce that `baseline` becomes the default in a
future release, and say how to keep today's behavior (`vfox config
path.mode legacy`).
AGENTS.md describes the receipt and link semantics, the diagnostics and
the PATH policy, so that it keeps matching the implementation, and notes
that flipping the default is a deliberate change that updates those
announcements with it.
8d1afea to
6f56a98
Compare
aooohan
left a comment
There was a problem hiding this comment.
I found six issues that I think we should fix before merging. The main ones are alias resolution picking the wrong installed version and alias updates changing unrelated settings. There are also a few gaps in the PATH handling and doctor checks, with repro details in the inline comments.
I reviewed 6f56a98 on macOS arm64 with Go 1.24.0. The build, go vet ./..., and CI=true go test ./... passed. Seven temporary regression cases using the PR's CLI fixtures reproduced the six issues below. For Nushell, I checked the generated activation script; I haven't run that case in a native Nushell session.
`use`, `exec`, `doctor` and `install` removed a leading `v` while parsing `<sdk>@<version>`, before they knew which names exist. Linked versions and aliases may start with a `v`, so: - `vfox alias set alpha v1 2.0.0` followed by `vfox use alpha@v1` selected 1.0.0, because `v1` had become the prefix `1`; - a linked version called `vendor` could not be used, run or diagnosed: `alpha@endor is not installed`, and `vfox install alpha@vendor` even installed a version `endor`. The commands now keep the version as typed. `Manager.ResolveVersionName` checks the name as typed first (an installed version, then an alias) and only then reads the `v` as the conventional prefix (`v20.1.0`), looking the name without it up the same way. `install` has no aliases to resolve and uses `sdk.StripVersionPrefix` directly. A version that is only on disk, such as a link whose target is gone, also counts as having that name, so `vfox doctor alpha@vendor` can report the broken link. `Sdk.HasVersion` answers that; `CheckRuntimeExist` stays the stricter "can be used".
`updateAliases` loaded the user config through `NewConfigWithPath`, which fills every section the file does not declare with its defaults, and saved the whole thing. Setting or removing an alias (and uninstalling a version that had one) therefore wrote `path.mode: legacy`, `diagnostics.onUse: true` and the other defaults into the user's file as if the user had chosen them. They then overrode what the shared config said: with `path.mode: baseline` and `diagnostics.onUse: false` there, the next process saw `legacy` and `true`. `config.AliasFile` reads and writes the `aliases` key of the file as a YAML document, so every other key and comment stays, and a section the file does not declare is still not declared afterwards. The key goes when no alias is left. A file that cannot be parsed, or whose aliases are malformed, is refused and left as it is.
`vfox activate` records the PATH baseline for `path.mode` by exporting `__VFOX_ORIG_PATH` in the script it prints. Nushell cannot evaluate that output: it only gets a `source` line, and the generated `vfox.nu` did not set the variable either. A Nushell session therefore never had a baseline, and `vfox env` fell back to the `legacy` ordering even with `path.mode: baseline`. The `export-env` block of `vfox.nu` now sets `__VFOX_ORIG_PATH` from the session's PATH, before the first `vfox env` call. vfox's own directories are left in; `env` skips them when it compares. Checked with Nushell 0.116.1: with `path.mode: baseline`, a directory that was in PATH at activation now goes behind vfox's and one added afterwards stays in front, while without the line both stayed in front. The unit test checks the generated script, since CI has no Nushell.
`vfox env` caches its output per shell session and recomputes it when a version file, the project or the PATH changes. `path.mode` was added to what invalidates it, but `path.preserve` was not, and `config.yaml` is not among the files whose modification time is watched. Removing a directory from `path.preserve` while keeping the mode therefore left the old ordering in effect until something else invalidated the cache, and the same held for an environment variable the setting names (`$PNPM_HOME`). The state now records a PATH policy key instead of the mode: the mode, the directories `path.preserve` expands to at that moment, and the directories of an active virtualenv or conda environment, sorted and normalized so that spelling and order do not matter.
`doctor` limits the shadowing check to the version in effect and took that from `Sdk.Current`, which only looks at the highest-priority selection. When that selection is not installed, `vfox env` falls back to the next installed one, but `Current` returned nothing and `doctor` skipped the check: with `[email protected]` installed globally and a project asking for the missing `[email protected]`, an `alphatool` ahead of vfox in PATH went unreported. `Manager.Diagnose` now takes a `VersionInEffect` from the command layer, which answers with the same installed-version fallback `env` uses (`resolveInstalledToolConfig`). Reading the version files, legacy ones included, moves into `loadToolChain`, which `env` and `activate` use as well, so that `doctor` cannot drift from them. `Current` is unchanged.
The shadowing check kept only the names of the SDK's commands, so any match in a directory in front of vfox counted as a different SDK's command. After linking a system or Homebrew installation as `alpha@sys`, a symlink to its own `alphatool` in an earlier PATH directory was reported as running "instead of alpha@sys", although it is the same file. `findShadows` keeps each command's own path and compares the first match with it through `os.SameFile`, which follows links. When they are the same file nothing is reported. The first match still ends the search for that command, since later ones never run.
…eates A section that the user's config file declares replaces the shared config's, and one it leaves out follows it. `NewConfigWithPath` creates a missing file from `DefaultConfig`, which since the diagnostics, PATH and alias settings were added includes `diagnostics`, `path` and `aliases`. The first run therefore wrote their defaults into the file, and from the second run on they overrode a shared VFOX_HOME: with `path.mode: baseline` and `diagnostics.onUse: false` there, every later process saw `legacy` and `true`. A new file now holds the sections it always had (what vfox 1.0.13 creates) and leaves those three out; `setOnDemand` lists them, for the next section of that kind. `vfox config` still saves the merged config into the user's file, which declares every section from then on; that is not changed here.
aooohan
left a comment
There was a problem hiding this comment.
Thanks for the fixes. I went through the seven follow-up commits on 6cca7a3 and rechecked all six points from my first review. They're addressed now:
- Names starting with
vare resolved before trying the version-prefix fallback. - Alias edits leave unrelated settings and shared-config inheritance alone.
- The generated Nushell script records the baseline before updating the environment.
- The env cache now accounts for
path.preserveand its expanded values. - Doctor checks the installed version that
envactually falls back to. - A symlink or hard link to the SDK's own executable no longer triggers a shadow warning.
The extra fix for a freshly generated user config looks good too; it avoids pinning the new defaults over shared settings.
I ran the build, go vet ./..., and CI=true go test ./... with Go 1.24.0 on macOS arm64. All passed, including the new regression tests, and GitHub CI is green for this commit. I checked the Nushell code and generated-script test, but haven't rerun it in native Nushell locally.
I don't have any remaining blockers from this review. Looks good to me.
* feat(config): make baseline the default path.mode `legacy` keeps every PATH entry in front of vfox's first directory in front of it, so a system directory that macOS path_helper or the Windows machine PATH put there keeps winning over the version `vfox use` selected (#337, #732). `baseline` fixes that by moving what was already in PATH when `vfox activate` ran behind vfox's directories, but everyone had to opt in with `vfox config path.mode baseline`. It is the default now; `vfox config path.mode legacy` brings back the behavior of 1.0.x. - config.DefaultPathMode names the default in one place. EmptyPath, both fallbacks of Path.EffectiveMode and the starting mode of pathPolicy() use it. - An empty or unknown mode is the default, as before, so a typo lands on baseline instead of failing `vfox env`, which runs at every prompt. EffectiveMode names `legacy` as a case of its own now, because it is no longer what the fallback returns. - A shell without a recorded baseline still behaves like legacy in every mode, so upgrading does not reorder the PATH of a running shell. - The path.shadowed hint for a directory that was already in PATH at activation can only come up in legacy mode now. It says so before it suggests `vfox config path.mode baseline`. Tests: the eleven that asserted the old default are updated. Tests that used `baseline` as the value that has to survive a merge, a save or a shared config would have passed for the wrong reason once it became the default, so they use `legacy`. New checks pin the default and its fallbacks, and that an unconfigured vfox leaves the PATH of a shell without a baseline alone. Part of #737 * docs: baseline is the default path.mode Quick Start and both READMEs no longer ask new installations to run `vfox config path.mode baseline`, and the configuration guide, the FAQ and AGENTS.md stop announcing that the default will change. Quick Start and the READMEs read as they did before #736 added that step. - Configuration guide (en, zh-hans): the section described what `legacy` does as the general behavior. It now says that `baseline` is the default, what `legacy` is, and how to keep the behavior of vfox 1.0.x: `vfox config path.mode legacy`, or `path.preserve` when only a few directories have to stay in front. - FAQ (en, zh-hans): a system JDK or a Homebrew node in front of vfox's directories no longer wins by default. It lists what still can (pnpm and anything added after `vfox activate`) and what to check when `vfox doctor` still names a system directory: a shell that was started before the upgrade, `legacy`, or `path.preserve`. - AGENTS.md: where the default is defined and what has to stay in step. Part of #737 * docs: only baseline mode falls back to legacy without a baseline AGENTS.md said that a shell without a recorded baseline behaves like `legacy` in every mode. Only `baseline` does: pathPolicy.keepInFront returns false for `aggressive` whether or not a baseline was recorded, and `legacy` never looks at one. Say that, instead of changing the policy: `aggressive` is an opt-in mode that this change does not touch. TestEnvWithoutABaselineBehavesLikeLegacyInEveryMode had the same overstatement in its name and only covered the default and `baseline`. It is now TestEnvWithoutABaselineOnlyBaselineModeFallsBackToLegacy and asserts the PATH of all four cases: the default, `baseline`, `legacy` and `aggressive`. Making `aggressive` follow `legacy`, or `baseline` stop doing so, fails it. Review feedback on #738.
Why
vfox treats an installed SDK as a directory name, and assumes it is the only author of what is inside that directory and of
PATH. A number of open reports are the same gap seen from different sides:flutter upgrade/downgrade/channelrewrite the SDK in place, and vfox has no record of what it installedPATHvfox exports is the one that takes effectnode, a system JDK or Homebrew'snodein front of vfox's directories (#337, #732)The core now owns the chain "record → check → tell", and plugins only supply facts. Unlike the shim proposal (#726), everything stays per version, vfox says what is actually in effect, and the user never has to run anything after a switch: receipts are written by
installandlink, the checks run afteruse, andactivaterecords the PATH baseline.What it adds
(Output of a local run with a throw-away plugin; names and paths changed for readability.)
.vfox-receipt.jsonin its version directory: what was asked for, the sources (URLs without credentials and query, never request headers), the vfox and plugin versions, and who owns the files. It is written atomically afterPostInstalland before the.installingmarker is removed, and it is advisory: failing to write it never fails an installation, and a version without one is a legacy installation for which every check that needs a baseline stays silent.vfox link <sdk>@<version> <path>registers an SDK that already exists. The version name is used as written, the plugin's ownEnvKeysdecides whether the directory looks like the SDK, and--forceonly re-points a link, never replaces a version vfox installed. A linked version works like any other (installis a no-op;use,env,infowork);uninstallremoves only the link and the receipt, runs noPreUninstalland works when the target is gone.vfox infogets{{.Home}}and--json.vfox doctor [<sdk>[@<version>]] [--json]runs the checks with stable finding IDs and exits with 1 only for errors. The fast checks also run aftervfox useand only print warnings; they never failuse.diagnostics.onUseanddiagnostics.ignore(<id>[:<sdk>[@<version>]]) control them.path.shadowedcompares the commands of the selected version with the executables in front of vfox's directories, in the ordervfox envis going to export; plugins can add explanations with declarativePLUGIN.shadowHints. It looks at the version the shell uses, which is whatvfox envexports, including its fallback to another installed version when the configured one is missing. A command that is the very file the SDK provides, such as a symlink to a linked SDK, is not a shadow.Fingerprinthook (optional) returns facts that identify an installation. They are stored in the receipt and compared again byuseanddoctor(sdk.drift).vfox install --reinstallrestores a version that changed in place, andvfox doctor --adoptwrites the missing receipts of legacy installations.path.mode(legacy|baseline|aggressive, pluspath.preserve).vfox activaterecords the PATH it found in__VFOX_ORIG_PATH, so that the system directories macOS and Windows put in front of vfox's can be told apart from what was added later (pnpm, a virtualenv). The default stayslegacy, which is today's behavior. Quick Start and the READMEs ask new installations to setbaseline, and the docs announce that it becomes the default in a future release. Nushell cannot evaluate whatactivateprints, so thevfox.nuthatactivate nushellgenerates records the baseline itself. A change ofpath.modeorpath.preserveapplies at the next prompt.vfox alias set|list|unset) are resolved for what is typed on the command line only (use,uninstall,info,exec,doctor) and never written to or read from version files, so.vfox.tomlstays portable. An installed version of the same name always wins. A leadingvin a typed version (v20.1.0) is only dropped when no version or alias has the name as typed, so aliases and linked versions may start with av.vfox aliasedits only thealiaseskey of the user'sconfig.yaml: the rest of the file stays as it is, and a section it does not declare keeps following the shared config.Detecthook (optional) lists SDKs found on the machine;vfox link --detect <sdk> [-y]links them, e.g. on a CI runner.Commits
The PR is meant to be read commit by commit. Each one builds and passes the tests on its own.
GetRuntimePackageusedDirEntry.IsDir(), so a linked SDK was listed but not found byinfo/use; plusinfo'sHomeand--json.vfox linkvfox doctorand warn when a command is shadowed on PATHpath.modesetting — the only commit that changes how PATH is assembled, and only when the setting is changed.Commits 8 to 14 answer the review of the first seven (six comments, one commit each) and one more problem found while testing. They are separate commits so that what changed since the review is easy to see.
v—alpha@v1selected the prefix1instead of the aliasv1, and a linkedvendorbecameendor.vfox aliaschange only the aliases in the user config — it saved the whole default-filled config, which pinnedpath.modeanddiagnosticsover the shared config.activateprints, so it never had a baseline.path.preservechanges — the cache was only keyed bypath.mode.vfox doctorcheck the PATH of the versionenvuses —doctorskipped the check whenenvfell back to another installed version.pathanddiagnosticsin a config file vfox creates — the first run wrote their defaults into the user's file, which then overrode a sharedVFOX_HOME.About 3.5k lines of production code, 7.1k lines of tests and 0.7k lines of docs (added lines). Happy to split it into several PRs if that is easier to review.
Compatibility
path.modeis set.vfox usewhen a command is shadowed (vfox config diagnostics.onUse falseturns it off), and the__VFOX_ORIG_PATHvariable thatactivateexports (in Nushell, the generatedvfox.nusets it).FingerprintandDetecthooks and theshadowHintsmetadata. Existing plugins work unchanged, and an older vfox does not load hook files it does not know.config.yamlthat vfox creates on a first run is the one it created before, without the newdiagnostics,pathandaliasessections, so a sharedVFOX_HOMEcan still decide them. A section the user's file declares replaces the shared one; one it does not declare follows it.sdk.Sdk(internal) gainsInstallation,Link,Reinstall,Adopt,Diagnose,DetectandHasVersion.Testing
go vet(linux, windows, darwin) andgo teston Linux. The regression tests of commit 1 and of commits 8 to 14 fail without the fix.vfox.nu. I also ran that script in Nushell 0.116.1: withpath.mode: baseline, a directory that was inPATHat activation goes behind vfox's and one added afterwards stays in front, while without the line both stayed in front.TestBashZshCompletionShellFormatfails in a CRLF checkout ([Feature]: Repo-wide line-ending policy via .gitattributes #727, chore: add repo-wide line-ending policy via .gitattributes #734); it is unrelated and passes in CI.Feedback welcome on
Fingerprintand.vfox-receipt.json.vfox usemay be on by default..vfox.toml. This differs from the second scenario in [Feature]: 支持为已安装的 SDK 版本添加别名/重命名功能 #670, where an alias is a team convention in the version file; a teammate without the alias would get an "is not installed" that vfox cannot explain.path.mode baselinenow and flipping the default later.Detectbelongs in the core or in the plugins.Not in this PR
vfox config <key> <value>still saves the merged config into the user's file, as before, so every section counts as declared by the user after it. Making it write only what was set would be a separate change.The plugin side follows in their repositories: vfox-flutter can drop its manifest-based drift detection for
Fingerprint, vfox-nodejs its PATH scan forshadowHints, and vfox-java can addDetect.Closes #706
Closes #669
Refs #670, #359, #337, #732