Skip to content

fix(config): treat non-Windows platforms as Unix in default_store_dir - #14863

Merged
zkochan merged 3 commits into
pnpm:mainfrom
devtechedge:fix/freebsd-store-dir-panic
Sep 14, 2026
Merged

zkochan merged 3 commits into
pnpm:mainfrom
devtechedge:fix/freebsd-store-dir-panic

Conversation

@devtechedge

@devtechedge devtechedge commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Running any pnpm command on FreeBSD aborts with the panic reported in #14859: the Rust config crate panics at crates/config/src/defaults.rs:107 with "unsupported operating system: freebsd", so even pnpm --version dies with SIGABRT after upgrading to pnpm 12.4.1.

This PR makes default_store_dir treat every non-Windows platform as Unix, so the default store directory on FreeBSD resolves to ~/.local/share/pnpm/store. The macOS arm is unchanged.

The file's other resolvers already follow this exact convention. default_pnpm_home_dir falls through to ~/.local/share/pnpm for all non-Windows platforms with an explicit comment stating that policy, and default_cache_dir falls through to ~/.cache/pnpm. default_store_dir was the only resolver that panicked instead of using that fallback. The shared config-dir and state-dir resolvers in pnpm-config-dir already fall back gracefully, so no other startup path panics on unknown OS strings.

The change follows the FreeBSD install fix in #14597, where the same non-Windows platforms were brought closer to working.

The OS-dependent tail is factored into a small store_dir_for_os helper taking the home dir and OS string, mirroring the crate's existing EnvVar/GetHomeDir test seams, so the new branch is unit-tested without a FreeBSD runner. Tests added: the Unix fallback for freebsd and netbsd, the unchanged macos arm, and a linux case. A changeset with a patch bump is included.

Fixes #14859


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed a startup crash affecting FreeBSD and other Unix-like platforms.
    • Store directories now resolve correctly across Unix-like operating systems.
    • macOS uses the standard ~/Library/pnpm/store location.
    • Other Unix-like platforms use ~/.local/share/pnpm/store when no platform-specific location is defined.
    • Unsupported Unix-like platforms now start normally instead of failing during store directory resolution.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e9353a05-155f-4ec6-9502-ff9c3232857b

📥 Commits

Reviewing files that changed from the base of the PR and between 216ea7a and 3708a11.

📒 Files selected for processing (2)
  • pnpm/crates/config/src/defaults.rs
  • pnpm/crates/config/src/defaults/tests.rs
💤 Files with no reviewable changes (1)
  • pnpm/crates/config/src/defaults/tests.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • pnpm/crates/config/src/defaults.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The configuration code now resolves a Unix store directory for FreeBSD and other non-Windows operating systems instead of panicking. Tests cover Unix-like and macOS paths, and a patch changeset documents the fix.

Changes

Store directory fallback

Layer / File(s) Summary
Store directory resolution
pnpm/crates/config/src/defaults.rs
default_store_dir now uses store_dir_for_os. macOS keeps ~/Library/pnpm/store; other non-Windows operating systems use ~/.local/share/pnpm/store.
Fallback validation and release note
pnpm/crates/config/src/defaults/tests.rs, .changeset/freebsd-store-dir-panic.md
Tests cover FreeBSD, NetBSD, Linux, and macOS paths. The changeset documents the FreeBSD startup fix.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Assessment against linked issues

Objective Addressed Explanation
Prevent pnpm commands from panicking on FreeBSD due to an unsupported operating system [#14859] ✅
Use a valid default store directory for FreeBSD and other Unix-like platforms [#14859] ✅

Suggested labels: product: pacquet

Merge Risk: ⚪ Minimal · up to 3708a

FreeBSD and other non-macOS Unix platforms now receive a valid default store location instead of being rejected. No actionable merge risk remains.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Sep 12, 2026
@codecov-commenter

codecov-commenter commented Sep 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.92%. Comparing base (8aea95b) to head (3708a11).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14863   +/-   ##
=======================================
  Coverage   90.92%   90.92%           
=======================================
  Files        1266     1266           
  Lines      169931   169933    +2     
=======================================
+ Hits       154511   154518    +7     
+ Misses      15420    15415    -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 3708a1104b36

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.349 ± 0.079 2.246 2.458 1.67 ± 0.15
pacquet@main 2.418 ± 0.125 2.247 2.578 1.71 ± 0.17
pnpr@HEAD 1.431 ± 0.109 1.308 1.613 1.01 ± 0.12
pnpr@main 1.410 ± 0.121 1.284 1.699 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.34853774572,
      "stddev": 0.0793778430702699,
      "median": 2.35357241062,
      "user": 1.50952646,
      "system": 1.45163388,
      "min": 2.24644407412,
      "max": 2.4581010641199996
    },
    {
      "command": "pacquet@main",
      "mean": 2.4180337374199996,
      "stddev": 0.12519669739330586,
      "median": 2.40052462762,
      "user": 1.66632556,
      "system": 1.6872510799999998,
      "min": 2.24692387012,
      "max": 2.57820373512
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.43065784392,
      "stddev": 0.10934892660029287,
      "median": 1.39362443512,
      "user": 1.53441756,
      "system": 1.49158148,
      "min": 1.30764191412,
      "max": 1.61282321512
    },
    {
      "command": "pnpr@main",
      "mean": 1.4099468447199999,
      "stddev": 0.1209805033494213,
      "median": 1.3955819956200002,
      "user": 1.3774715600000003,
      "system": 1.37136098,
      "min": 1.28373587012,
      "max": 1.6987747261200001
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 220.0 ± 14.5 199.7 240.4 1.02 ± 0.08
pacquet@main 216.5 ± 9.1 204.5 232.1 1.00
pnpr@HEAD 227.0 ± 13.2 211.7 255.9 1.05 ± 0.08
pnpr@main 244.6 ± 13.8 232.6 279.0 1.13 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.22000636978000002,
      "stddev": 0.014452131303112011,
      "median": 0.21814035298,
      "user": 0.23760831999999996,
      "system": 0.5381856199999999,
      "min": 0.19968724148,
      "max": 0.24042479548
    },
    {
      "command": "pacquet@main",
      "mean": 0.21650295077999998,
      "stddev": 0.009103887866970828,
      "median": 0.21426318298000002,
      "user": 0.23144462,
      "system": 0.54187012,
      "min": 0.20448699748000002,
      "max": 0.23207316348
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.22699347207999998,
      "stddev": 0.0132121051117144,
      "median": 0.22316859348,
      "user": 0.24133591999999998,
      "system": 0.5220652199999999,
      "min": 0.21171423948,
      "max": 0.25586634148000004
    },
    {
      "command": "pnpr@main",
      "mean": 0.24462931368000004,
      "stddev": 0.0137632774520718,
      "median": 0.24276273848000002,
      "user": 0.24616501999999998,
      "system": 0.5486830199999998,
      "min": 0.23260311748,
      "max": 0.27903801848000004
    }
  ]
}

Scenario: Isolated linker: repeat install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 8.8 ± 1.4 6.2 16.2 1.05 ± 0.20
pacquet@main 10.1 ± 1.6 7.6 16.6 1.21 ± 0.23
pnpr@HEAD 8.4 ± 2.2 6.7 43.6 1.00 ± 0.28
pnpr@main 8.4 ± 0.9 6.6 11.5 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.008768641523846162,
      "stddev": 0.0013632025718072125,
      "median": 0.00852386852,
      "user": 0.004931421538461537,
      "system": 0.004330611769230771,
      "min": 0.00621331302,
      "max": 0.016171209020000004
    },
    {
      "command": "pacquet@main",
      "mean": 0.010087796229374998,
      "stddev": 0.0015510219219986012,
      "median": 0.00987580652,
      "user": 0.005857847500000001,
      "system": 0.004822888187500001,
      "min": 0.007628930020000001,
      "max": 0.016611014020000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.00836899231906543,
      "stddev": 0.0021547519792791212,
      "median": 0.00821102402,
      "user": 0.004954391775700934,
      "system": 0.00374238012461059,
      "min": 0.00669710002,
      "max": 0.04362216202
    },
    {
      "command": "pnpr@main",
      "mean": 0.008354355739626172,
      "stddev": 0.0008956578248950648,
      "median": 0.00824389602,
      "user": 0.004896827912772584,
      "system": 0.0038897531464174447,
      "min": 0.00659363702,
      "max": 0.01154185802
    }
  ]
}

Scenario: Isolated linker: repeat install, cold cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 8.2 ± 0.6 6.8 10.8 1.02 ± 0.11
pacquet@main 8.6 ± 0.9 6.8 11.6 1.08 ± 0.14
pnpr@HEAD 8.4 ± 0.6 7.4 11.3 1.06 ± 0.11
pnpr@main 8.0 ± 0.6 6.8 10.9 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.008152005872755911,
      "stddev": 0.0006350379022442011,
      "median": 0.008024789420000001,
      "user": 0.004592244251968506,
      "system": 0.00420717850393701,
      "min": 0.006842663420000001,
      "max": 0.01076883942
    },
    {
      "command": "pacquet@main",
      "mean": 0.008592788087844526,
      "stddev": 0.0009120408297114217,
      "median": 0.00843711642,
      "user": 0.004952998515901061,
      "system": 0.0043127778798586576,
      "min": 0.0067886534200000005,
      "max": 0.01158427542
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.008439520273754948,
      "stddev": 0.0005851207221594964,
      "median": 0.00832077742,
      "user": 0.004998841027667986,
      "system": 0.00412091067193676,
      "min": 0.0073501014199999996,
      "max": 0.011328007420000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.00798542553724138,
      "stddev": 0.0006156669997834938,
      "median": 0.00790462942,
      "user": 0.004282963448275862,
      "system": 0.004317001862068963,
      "min": 0.00681810442,
      "max": 0.01087665942
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.486 ± 0.065 2.413 2.585 1.64 ± 0.11
pacquet@main 2.480 ± 0.057 2.416 2.601 1.64 ± 0.11
pnpr@HEAD 1.558 ± 0.135 1.358 1.708 1.03 ± 0.11
pnpr@main 1.517 ± 0.096 1.372 1.651 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.4863737527,
      "stddev": 0.06479683268090129,
      "median": 2.4643320989,
      "user": 1.7850478000000003,
      "system": 1.6557515999999999,
      "min": 2.4130367674,
      "max": 2.5852627064000004
    },
    {
      "command": "pacquet@main",
      "mean": 2.4801758953,
      "stddev": 0.05700361678344803,
      "median": 2.4581977034,
      "user": 1.7290964000000002,
      "system": 1.5932112999999999,
      "min": 2.4164783734,
      "max": 2.6010378924000004
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5581806935,
      "stddev": 0.13455416269209314,
      "median": 1.5619347514,
      "user": 1.0024653999999997,
      "system": 1.1785284,
      "min": 1.3582400034,
      "max": 1.7075967453999998
    },
    {
      "command": "pnpr@main",
      "mean": 1.5168493013,
      "stddev": 0.096425476216883,
      "median": 1.5155024219,
      "user": 1.0435629000000002,
      "system": 1.2789853999999998,
      "min": 1.3722065544,
      "max": 1.6510032804
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 361.5 ± 17.0 335.9 391.3 1.32 ± 0.09
pacquet@main 351.1 ± 14.1 338.5 374.2 1.28 ± 0.08
pnpr@HEAD 273.5 ± 12.1 256.5 296.1 1.00
pnpr@main 275.8 ± 11.2 259.7 294.2 1.01 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.36154715430000006,
      "stddev": 0.01697213415299323,
      "median": 0.3585944607,
      "user": 0.58520968,
      "system": 0.80540852,
      "min": 0.33592544620000003,
      "max": 0.39132316320000005
    },
    {
      "command": "pacquet@main",
      "mean": 0.3511053143000001,
      "stddev": 0.014106684355182036,
      "median": 0.34318615620000004,
      "user": 0.5519303799999999,
      "system": 0.8026075199999999,
      "min": 0.33847745720000005,
      "max": 0.37419934120000004
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27350711070000006,
      "stddev": 0.012107765398295651,
      "median": 0.27348053020000007,
      "user": 0.21976548,
      "system": 0.51275242,
      "min": 0.25645288620000006,
      "max": 0.29605405320000006
    },
    {
      "command": "pnpr@main",
      "mean": 0.27583016250000003,
      "stddev": 0.01117672369292875,
      "median": 0.2757027127,
      "user": 0.22301638000000001,
      "system": 0.51763372,
      "min": 0.25967628420000005,
      "max": 0.29422786120000005
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.580 ± 0.022 1.531 1.601 5.70 ± 0.40
pacquet@main 1.682 ± 0.161 1.545 1.964 6.06 ± 0.71
pnpr@HEAD 0.287 ± 0.013 0.268 0.313 1.03 ± 0.09
pnpr@main 0.277 ± 0.019 0.249 0.305 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.5802170348,
      "stddev": 0.022306287590982462,
      "median": 1.5870929963,
      "user": 0.8628375599999998,
      "system": 0.9643357800000001,
      "min": 1.5312239913,
      "max": 1.6006975993
    },
    {
      "command": "pacquet@main",
      "mean": 1.6817479680000003,
      "stddev": 0.16080302769131888,
      "median": 1.6065162128000001,
      "user": 1.06379516,
      "system": 1.08301968,
      "min": 1.5447493353,
      "max": 1.9635637613
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.2869308147000001,
      "stddev": 0.01313778060216174,
      "median": 0.28766356830000006,
      "user": 0.23550246000000002,
      "system": 0.5382797800000001,
      "min": 0.26771048030000005,
      "max": 0.3132632873
    },
    {
      "command": "pnpr@main",
      "mean": 0.27747131640000006,
      "stddev": 0.019114670740098975,
      "median": 0.27846495830000006,
      "user": 0.21834376,
      "system": 0.50942528,
      "min": 0.2493948533,
      "max": 0.30453668330000006
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 204.0 ± 18.9 171.3 233.9 2.28 ± 0.22
pacquet@main 195.9 ± 20.7 171.3 235.0 2.19 ± 0.24
pnpr@HEAD 90.4 ± 3.4 86.6 101.3 1.01 ± 0.05
pnpr@main 89.3 ± 2.1 86.4 92.7 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.20402683046333336,
      "stddev": 0.018915944957588804,
      "median": 0.20575221788,
      "user": 0.20959334999999993,
      "system": 0.08507513999999998,
      "min": 0.17130199738000002,
      "max": 0.23385614538000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.1959157558175,
      "stddev": 0.020746069040465144,
      "median": 0.19004521888,
      "user": 0.17962341249999997,
      "system": 0.07402339,
      "min": 0.17133983138,
      "max": 0.23498880538
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09044825381750002,
      "stddev": 0.003438707053794231,
      "median": 0.09010107787999999,
      "user": 0.032665599999999996,
      "system": 0.013255881249999997,
      "min": 0.08660360538,
      "max": 0.10127162038000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.08934715447677422,
      "stddev": 0.0021045568993305675,
      "median": 0.09000335438,
      "user": 0.031094454838709675,
      "system": 0.014234446451612906,
      "min": 0.08638346638,
      "max": 0.09265027838
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 618.7 ± 122.7 332.8 787.3 1.00
pacquet@main 710.8 ± 84.1 568.2 839.2 1.15 ± 0.27
pnpm@HEAD 3099.2 ± 267.6 2915.7 3762.0 5.01 ± 1.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6186510474155557,
      "stddev": 0.12272119656874748,
      "median": 0.6416256868600001,
      "user": 0.6392712399999999,
      "system": 0.15456217777777775,
      "min": 0.33275638286000003,
      "max": 0.7872755988600001
    },
    {
      "command": "pacquet@main",
      "mean": 0.7107683720822222,
      "stddev": 0.08410917075734665,
      "median": 0.73449108886,
      "user": 0.7474584622222221,
      "system": 0.14504362222222222,
      "min": 0.5682096628600001,
      "max": 0.8391854968600001
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.0991893037488887,
      "stddev": 0.26761380507034943,
      "median": 3.0036405298599997,
      "user": 4.8866715733333335,
      "system": 0.19975573333333335,
      "min": 2.91567115186,
      "max": 3.7620284048599997
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.320 ± 0.081 4.253 4.536 1.26 ± 0.04
pacquet@main 4.359 ± 0.074 4.265 4.505 1.27 ± 0.04
pnpr@HEAD 3.420 ± 0.078 3.344 3.551 1.00
pnpr@main 3.491 ± 0.151 3.343 3.741 1.02 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.3195499671599995,
      "stddev": 0.08116866216682539,
      "median": 4.29999533216,
      "user": 1.4218217999999998,
      "system": 1.47745522,
      "min": 4.2528512221599994,
      "max": 4.53584647616
    },
    {
      "command": "pacquet@main",
      "mean": 4.35920777736,
      "stddev": 0.07436445776523372,
      "median": 4.349971851159999,
      "user": 1.4881124,
      "system": 1.4596920199999999,
      "min": 4.26475006116,
      "max": 4.50515712216
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.42034183556,
      "stddev": 0.07832054468572398,
      "median": 3.38950335516,
      "user": 1.3587636,
      "system": 1.36607722,
      "min": 3.34405554716,
      "max": 3.55127740416
    },
    {
      "command": "pnpr@main",
      "mean": 3.49144917776,
      "stddev": 0.15058063101846028,
      "median": 3.45253801816,
      "user": 1.4228141,
      "system": 1.42130962,
      "min": 3.34349053616,
      "max": 3.74051623016
    }
  ]
}

Scenario: GVS linker: fresh restore, hot cache + hot store

Same install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 120.5 ± 22.4 101.0 180.5 1.00
pacquet@main 178.5 ± 17.1 160.4 212.8 1.48 ± 0.31
pnpr@HEAD 185.3 ± 19.5 152.9 224.9 1.54 ± 0.33
pnpr@main 156.3 ± 30.4 122.7 206.0 1.30 ± 0.35
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.12045198668631578,
      "stddev": 0.0224164136552661,
      "median": 0.11020371616,
      "user": 0.1458116652631579,
      "system": 0.13244107894736842,
      "min": 0.10099336616,
      "max": 0.18054732416000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.17849793699333336,
      "stddev": 0.017092929495575702,
      "median": 0.17264497416000002,
      "user": 0.21739789333333337,
      "system": 0.18229358333333331,
      "min": 0.16038378916,
      "max": 0.21284632916000001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.18531011076000004,
      "stddev": 0.01946966927860839,
      "median": 0.18293889316000003,
      "user": 0.19155916000000003,
      "system": 0.1958087666666667,
      "min": 0.15288249116000002,
      "max": 0.22493532016000004
    },
    {
      "command": "pnpr@main",
      "mean": 0.15632382899333336,
      "stddev": 0.03044643727399605,
      "median": 0.15011178116,
      "user": 0.18511539333333335,
      "system": 0.1483573333333333,
      "min": 0.12271830516,
      "max": 0.20600425316
    }
  ]
}

@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14863
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
100.99 ms
(-14.16%)Baseline: 117.66 ms
141.19 ms
(71.53%)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,413.04 ms
(-1.36%)Baseline: 2,446.21 ms
2,935.45 ms
(82.20%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,531.22 ms
(-0.51%)Baseline: 1,539.00 ms
1,846.80 ms
(82.91%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
335.93 ms
(-6.27%)Baseline: 358.38 ms
430.06 ms
(78.11%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
171.30 ms
(-11.53%)Baseline: 193.63 ms
232.36 ms
(73.72%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,246.44 ms
(-1.73%)Baseline: 2,285.95 ms
2,743.14 ms
(81.89%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,252.85 ms
(-1.79%)Baseline: 4,330.48 ms
5,196.57 ms
(81.84%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
199.69 ms
(-5.04%)Baseline: 210.29 ms
252.35 ms
(79.13%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
332.76 ms
(-37.85%)Baseline: 535.42 ms
642.51 ms
(51.79%)
isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
🚷 view threshold
6.84 ms
(+12.48%)Baseline: 6.08 ms
7.30 ms
(93.73%)
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
🚷 view threshold
6.21 ms
(-2.94%)Baseline: 6.40 ms
7.68 ms
(80.89%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14863
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
152.88 ms
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,358.24 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
267.71 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
256.45 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
86.60 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,307.64 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,344.06 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
211.71 ms
isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
7.35 ms
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
6.70 ms
🐰 View full continuous benchmarking report in Bencher

devtechedge and others added 2 commits September 14, 2026 13:34
Every pnpm command aborted with SIGABRT on FreeBSD because
default_store_dir panicked on any OS string other than linux or
macos, while its siblings default_pnpm_home_dir and default_cache_dir
already fall through to a Unix layout for every non-Windows platform.
The Rust config crate made the panic fatal on startup, even for
--version.

Route the OS-dependent tail of default_store_dir through a small
store_dir_for_os helper so the fallback is unit-testable on hosts no
CI runner builds on, and add tests pinning the Unix fallback for
freebsd and netbsd plus the unchanged macOS arm.

Fixes #14859

Signed-off-by: devtechedge <[email protected]>
`test_default_store_dir_falls_back_to_home_dir` aborted on any OS string
other than linux or macos, so `cargo test` still failed on the very
platform this branch unblocks. Give it the same macos / fallback split
the implementation has.

Drop the copy of the platform policy from `store_dir_for_os`. It already
stands on `default_store_dir`; the helper's doc only needs what its
caller cannot say, namely why the OS is a parameter and that Windows
returns before reaching it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016t59BAY3Bahmv96psDYxEZ
@zkochan
zkochan force-pushed the fix/freebsd-store-dir-panic branch from 652ae0e to 216ea7a Compare September 14, 2026 11:42
@qodo-code-review

qodo-code-review Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. FreeBSD default stays undocumented 🔗 Cross-repo conflict ≡ Correctness
Description
store_dir_for_os now assigns ~/.local/share/pnpm/store to every non-Windows, non-macOS platform,
but pnpm.io's current storeDir contract associates that path only with Linux. When neither
PNPM_HOME nor XDG_DATA_HOME is set, users on FreeBSD and Android—both documented pnpm 12
targets—cannot determine their effective default from the canonical settings page.
Code

pnpm/crates/config/src/defaults.rs[128]

+        _ => home_dir.join(".local/share/pnpm/store"),
Relevance

●● Moderate

Documentation-contract concern is plausible, but historical evidence is mixed and the PR
intentionally establishes a broader Unix fallback.

PR-#14115
PR-#13731

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The PR implementation routes every OS except macOS through the Unix-style path. The canonical
pnpm.io settings page labels that path only as Linux's default, while its installation page
explicitly lists FreeBSD and Android as supported pnpm 12 platforms.

pnpm/crates/config/src/defaults.rs[125-128]
External repo: pnpm/pnpm.io, docs/settings/store.md [11-16]
External repo: pnpm/pnpm.io, docs/installation.md [12-25]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The pnpm 12 implementation now uses `~/.local/share/pnpm/store` on all non-Windows, non-macOS platforms, while pnpm.io documents that default only for Linux. Coordinate a pnpm.io documentation update so supported FreeBSD and Android users see the effective default.

## Fix Focus Areas
- /cross_repos/pnpm.io/docs/settings/store.md[11-16]

## Recommended Fix
Update the current `storeDir` defaults list in pnpm.io to describe `~/.local/share/pnpm/store` as the fallback for Linux and other non-Windows, non-macOS platforms, explicitly including FreeBSD and Android where useful.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 37 rules
Review mode: ⏭️ Skipped: The latest push only changes comments/documentation in source and tests, with no behavioral or configuration impact.

Grey Divider

Tip of the day
💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@greptile-apps

greptile-apps Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The implementation appears safe to merge, with only a non-blocking documentation concern remaining from the previous review.

Reviews (2) · Last reviewed commit: "docs(config): drop the store-dir comment..."

Comment thread pnpm/crates/config/src/defaults.rs Resolved
`store_dir_for_os` opened by restating what it is and where its contract
lives, and the macOS test's doc repeated its own name. Keep only what a
reader cannot get from the code: why the OS is a parameter, and that
Windows returns before reaching the match.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016t59BAY3Bahmv96psDYxEZ
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 3708a11

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@zkochan
zkochan merged commit fcce4e8 into pnpm:main Sep 14, 2026
53 checks passed
devtechedge added a commit to devtechedge/oss-contributions that referenced this pull request Sep 14, 2026
Record pnpm/pnpm#14863 and recharts/recharts#7805 as merged, add
publications.json plus the Sync merged OSS workflow so README, resume,
LinkedIn, profile fragment, About, and resume artifacts stay in lockstep.
@devtechedge

Copy link
Copy Markdown
Contributor Author

Thanks for the review and merge, @zkochan!

default_store_dir was the only resolver that panicked on an unknown OS string.

Aligning it with default_pnpm_home_dir and default_cache_dir means FreeBSD and the other non-Windows platforms get the Unix store path instead of aborting at startup.

Dropping the store-dir comments was the right call. The helper names already carry that.

biisal pushed a commit to biisal/pnpm that referenced this pull request Sep 15, 2026
…pnpm#14863)

Running any pnpm command on FreeBSD aborts with the panic reported in pnpm#14859: the Rust config crate panics at `crates/config/src/defaults.rs:107` with "unsupported operating system: freebsd", so even `pnpm --version` dies with SIGABRT after upgrading to pnpm 12.4.1.

This PR makes `default_store_dir` treat every non-Windows platform as Unix, so the default store directory on FreeBSD resolves to `~/.local/share/pnpm/store`. The macOS arm is unchanged.

The file's other resolvers already follow this exact convention. `default_pnpm_home_dir` falls through to `~/.local/share/pnpm` for all non-Windows platforms with an explicit comment stating that policy, and `default_cache_dir` falls through to `~/.cache/pnpm`. `default_store_dir` was the only resolver that panicked instead of using that fallback. The shared config-dir and state-dir resolvers in `pnpm-config-dir` already fall back gracefully, so no other startup path panics on unknown OS strings.

The change follows the FreeBSD install fix in pnpm#14597, where the same non-Windows platforms were brought closer to working.

The OS-dependent tail is factored into a small `store_dir_for_os` helper taking the home dir and OS string, mirroring the crate's existing `EnvVar`/`GetHomeDir` test seams, so the new branch is unit-tested without a FreeBSD runner. Tests added: the Unix fallback for `freebsd` and `netbsd`, the unchanged `macos` arm, and a `linux` case. A changeset with a patch bump is included.

Fixes pnpm#14859

---------

Signed-off-by: devtechedge <[email protected]>
Co-authored-by: Zoltan Kochan <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
u9g pushed a commit to u9g/pnpm that referenced this pull request Sep 25, 2026
…pnpm#14863)

Running any pnpm command on FreeBSD aborts with the panic reported in pnpm#14859: the Rust config crate panics at `crates/config/src/defaults.rs:107` with "unsupported operating system: freebsd", so even `pnpm --version` dies with SIGABRT after upgrading to pnpm 12.4.1.

This PR makes `default_store_dir` treat every non-Windows platform as Unix, so the default store directory on FreeBSD resolves to `~/.local/share/pnpm/store`. The macOS arm is unchanged.

The file's other resolvers already follow this exact convention. `default_pnpm_home_dir` falls through to `~/.local/share/pnpm` for all non-Windows platforms with an explicit comment stating that policy, and `default_cache_dir` falls through to `~/.cache/pnpm`. `default_store_dir` was the only resolver that panicked instead of using that fallback. The shared config-dir and state-dir resolvers in `pnpm-config-dir` already fall back gracefully, so no other startup path panics on unknown OS strings.

The change follows the FreeBSD install fix in pnpm#14597, where the same non-Windows platforms were brought closer to working.

The OS-dependent tail is factored into a small `store_dir_for_os` helper taking the home dir and OS string, mirroring the crate's existing `EnvVar`/`GetHomeDir` test seams, so the new branch is unit-tested without a FreeBSD runner. Tests added: the Unix fallback for `freebsd` and `netbsd`, the unchanged `macos` arm, and a `linux` case. A changeset with a patch bump is included.

Fixes pnpm#14859

---------

Signed-off-by: devtechedge <[email protected]>
Co-authored-by: Zoltan Kochan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review state: automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running any pnpm command under FreeBSD results in a "Unsupported platform" panic

3 participants