Commit cbcd91b
fix(shared/filesystem): make package build and tests pass on macOS (#2604)
The filesystem package referenced Linux-only fields on syscall.Stat_t
(Atim, Ctim, Mtim), causing 'go test ./...' to fail on Darwin where
those fields are named Atimespec/Ctimespec/Mtimespec.
Refactor the OS-specific stat extraction into a small statTimes struct
and an extractStatTimes helper, implemented per-platform behind build
tags:
- entry_linux.go (//go:build linux) uses Atim/Ctim/Mtim
- entry_darwin.go (//go:build darwin) uses Atimespec/Ctimespec/Mtimespec
This keeps production behavior unchanged on Linux while letting the
package compile and its tests run on macOS, so contributors can run 'go
test ./...' from packages/shared locally without cross-compiling.
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent f63690d commit cbcd91b
3 files changed
Lines changed: 46 additions & 5 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
| |||
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
63 | 74 | | |
64 | 75 | | |
65 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments