Files
bun.sh/test/cli
Dylan Conway 6961f696e3 feat: implement filesystem-aware cache for package installation
This adds filesystem detection logic to Bun's cache directory so that
the cache is placed on the same mount/filesystem as the install location
(node_modules). This enables efficient hardlink creation during package
installation.

Key changes:
- Add filesystem_utils.zig with utilities for filesystem detection
- Update PackageManagerDirectories to check filesystem boundaries
- Add fetchCacheDirectoryPathWithInstallDir that considers install location
- Add findOptimalCacheDir to walk up directory tree for writable cache location
- Add comprehensive tests for filesystem-aware cache behavior

The implementation will:
1. Use default cache when on same filesystem as node_modules
2. Find optimal cache location on same filesystem when different
3. Walk up from mount point toward project to find writable location
4. Fall back to project-local cache if no suitable location found
5. Respect explicit BUN_INSTALL_CACHE_DIR settings

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 13:35:53 -07:00
..
2025-05-24 13:36:51 -07:00
2025-05-16 23:40:56 -07:00