Skip to content

docs: clarify Nushell XDG startup requirements and recovery - #2704

Merged
fengmk2 merged 7 commits into
voidzero-dev:mainfrom
naokihaba:test/nushell-xdg-autoload-mismatch
Sep 15, 2026
Merged

fengmk2 merged 7 commits into
voidzero-dev:mainfrom
naokihaba:test/nushell-xdg-autoload-mismatch

Conversation

@naokihaba

@naokihaba naokihaba commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

resolves: #2491

Context

Nushell sets up its autoload directories before config.nu runs. If config.nu then changes XDG_DATA_HOME to a different location, the Vite+ installer picks up the new path and writes its snippet to a directory that fresh sessions launched from the original parent environment will not load. If XDG_DATA_HOME is never set, this is not an issue.

This setup does not meet Nushell's documented startup requirement, which states that directory-related XDG variables must be set before Nushell launches. While assigning them in config.nu is valid, it only affects child processes and will not update the autoload paths already resolved for the current session.

As described in the investigation results, we reproduced the mismatch on macOS with Nushell 0.115.1. Passing the original autoload path explicitly would require changing how the installer is invoked, switching to user autoload only addresses part of the problem, and warning whenever XDG_DATA_HOME is set would be noisy for correctly configured users.

Based on those findings, this PR updates the Getting Started guide by documenting the startup requirement and outlining a workaround for affected users, who can manually source Vite+'s env.nu in their config.nu. We have left the installer itself untouched.

Integration tests reproduce the mismatch, verify that everything works when XDG_DATA_HOME is set before startup, and confirm that sourcing the file allows a fresh session to load Vite+ and run vp help.

@naokihaba naokihaba self-assigned this Sep 14, 2026
@naokihaba naokihaba changed the title test: reproduce Nushell autoload mismatch with config-time XDG settings docs: clarify Nushell XDG startup requirements and recovery Sep 14, 2026
@naokihaba
naokihaba marked this pull request as ready for review September 14, 2026 18:41
@naokihaba
naokihaba requested a review from fengmk2 September 14, 2026 18:41
@naokihaba

Copy link
Copy Markdown
Collaborator Author

I will fix the conflicts.

@naokihaba

Copy link
Copy Markdown
Collaborator Author
  • rolldown-binaries (ID: 10377436348, Size: 7982906, Expected Digest: sha256:52124c7d1dd27f3f0d3d7a5c581fe0062aea227df5f6898b12841825a26c8bf0)
    Error: Unable to download artifact(s): Failed to ListArtifacts: Received non-retryable error: Failed request: (403) Forbidden: Error from intermediary with HTTP status code 403 "Forbidden"

🤔 retry

@naokihaba
naokihaba marked this pull request as draft September 15, 2026 02:11
@naokihaba
naokihaba marked this pull request as ready for review September 15, 2026 02:18
@fengmk2
fengmk2 merged commit c7527b6 into voidzero-dev:main Sep 15, 2026
74 of 76 checks passed
fengmk2 added a commit that referenced this pull request Sep 18, 2026
This release fixes Homebrew setup, Windows installation, and workspace
dependency commands. It also updates Rolldown, Oxlint, and Oxfmt.

### Fixes & Enhancements

- Homebrew installations complete setup once, retain their bundled CLI,
and direct upgrades to `brew upgrade vite-plus`
([#2729](#2729)), by
@fengmk2.
- Windows installations decode remote legacy PowerShell scripts
correctly
([#2701](#2701)), by
@james-elicx.
- `vp migrate` removes the unsupported React Refresh
`allowCompoundComponents` option and warns about possible lint errors
([#2702](#2702)), by
@fengmk2.
- New monorepo packages use the root lint configuration without a
conflicting nested configuration
([#2667](#2667)), by
@semimikoh.
- Yarn Classic rejects filtered additions and removals instead of
changing unintended dependencies
([#2705](#2705)), by
@jong-kyung.
- Yarn Berry rejects unsupported filtered updates and respects filters
during recursive removal
([#2709](#2709),
[#2712](#2712)), by
@jong-kyung.
- Yarn and Bun warn when a command does not support `--workspace-root`.
Yarn Classic accepts root additions through `vp add` and `vp install
<packages>`
([#2713](#2713)), by
@jong-kyung.
- `vp dedupe` warns about unsupported check options
([#2717](#2717)), by
@jong-kyung.
- Rust command output respects `NO_COLOR`
([#2716](#2716)), by
@liangmiQwQ.
- Windows commands find lowercase shims in directories with
case-sensitive file names
([#2727](#2727)), by
@fengmk2.

### Dependency Updates

- Update `rolldown@1.2.8` to `rolldown@1.2.9`, `oxlint@1.82.0` to
`oxlint@1.83.0`, and `oxfmt@0.67.0` to `oxfmt@0.68.0`. The new lint and
format versions can flag code that passed before. Run `vp fmt` after
upgrading if CI runs `vp check`
([#2725](#2725)), by
@voidzero-guard[bot].

### Docs

- Reorganize the guide and expand the global CLI sections
([#2684](#2684),
[#2715](#2715)), by
@liangmiQwQ.
- Explain Nushell startup requirements and recovery for XDG
installations
([#2704](#2704)), by
@naokihaba.

### Chore

- Add documentation previews for fork PRs
([#2691](#2691)), by
@fengmk2.
- Publish `@voidzero-dev/vite-plus-prompts` with npm releases
([#2707](#2707)), by
@fengmk2.
- Reuse native preview installations and clarify release evidence and
package checks
([#2693](#2693),
[#2708](#2708)), by
@fengmk2.
- Stabilize dependency-removal snapshots and temporarily skip Socket
Firewall tests on Windows
([#2711](#2711),
[#2730](#2730)), by
@fengmk2.
- Clarify package-manager comments and update the preview workflow
reference ([#2706](#2706),
[#2714](#2714)), by
@jong-kyung.
- Run dependency upgrade automation with Kimi K3
([#2723](#2723)), by
@Brooooooklyn.

### Bundled Versions

| Tool | Version | Source |
| --- | --- | --- |
| `vite` | `8.3.0` |
[`434e8e9`](vitejs/vite@434e8e9)
|
| `rolldown` | `1.2.9` |
[`5b4746e`](rolldown/rolldown@5b4746e)
|
| `tsdown` | `0.23.0` | [npm](https://npmx.dev/package/tsdown/v/0.23.0)
|
| `vitest` | `4.1.11` | [npm](https://npmx.dev/package/vitest/v/4.1.11)
|
| `oxlint` | `1.83.0` | [npm](https://npmx.dev/package/oxlint/v/1.83.0)
|
| `oxlint-tsgolint` | `7.0.2001` |
[npm](https://npmx.dev/package/oxlint-tsgolint/v/7.0.2001) |
| `oxfmt` | `0.68.0` | [npm](https://npmx.dev/package/oxfmt/v/0.68.0) |

### Upgrade

```bash
vp upgrade
```

### New Contributors

@james-elicx

**Full Changelog**:
v0.3.2...v0.3.3

---

Merging this PR will trigger the release workflow.

---------

Co-authored-by: voidzero-guard[bot] <278573678+voidzero-guard[bot]@users.noreply.github.com>
Co-authored-by: MK <fengmk2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Nushell vendor autoload mismatch when XDG variables are set in config.nu

2 participants