Skip to content

loopvec: label -d diffs with the file's path - #6

Merged
thesyncim merged 4 commits into
masterfrom
diff-labels
Nov 1, 2026
Merged

thesyncim merged 4 commits into
masterfrom
diff-labels

Conversation

@thesyncim

@thesyncim thesyncim commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #4.

flag_diff.txt fails on macOS. The -d headers carry diff's timestamp, and BSD diff prints it differently from GNU diff (no fractional seconds, no zone). It's the timestamp of a temp file anyway, so it doesn't tell the reader anything.

This passes -L path for both sides (GNU, BSD and busybox diff all have it), so the headers are just --- path / +++ path like gofmt -d, and the filename replacement goes away. The four diff scripts now expect the path alone.

It's one of three small fixes to get the suite passing on macOS, along with #7 and #8, which I needed while trying loopvec on goav1.

ubuntu-latest is now ubuntu-26.04, which has no qemu-user-static
package, so every run fails at the install step and skips the arm64
tsvc run, the golden check, fmt and lint. qemu-user ships the static
emulators there; link qemu-aarch64-static to it when the name is
missing, as the Makefile runs that name.
Go tip writes export data in iexport version 4, which encodes float
constants exactly. x/tools v0.51.0, and the v0.52.0 release, read only
up to version 3, so on tip go/packages fails for every package:

  cannot import "math" (unstable iexport format version 4, just rebuild
  compiler and std library), export data is newer version - update tool

and every script that runs loopvec fails in the tip job. x/tools master
reads version 4 (golang/tools@966056e2637c). Update to it until a release
includes it. The pinned toolchain is unaffected.
go1.27.3 is the latest 1.27 release. Its simd package is the same as
go1.27.1's, so the capability table only changes in its header, and
the -methods crash (golang/go#80657) is still there, as
flag_methods_ice.txt checks. go.mod keeps go 1.27.1: that is the first
release whose simd package loopvec's output compiles against
(go1.27.0's ShiftAllRight takes a uint8).
-d ran diff -u on two temporary files and replaced their names with the
file's path, so each header still carried diff's timestamp. GNU diff
prints it as "2026-10-31 18:49:17.123456789 +0000" and BSD diff, the one
macOS ships, as "2026-10-31 18:49:17", which made flag_diff.txt fail on
macOS, and the timestamp of a temporary file says nothing about the
source.

diff now labels both sides with the path (-L, which GNU and BSD diff both
support), as gofmt -d does, so the headers are the same everywhere.
@thesyncim
thesyncim merged commit 3e8770e into master Nov 1, 2026
2 checks passed
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.

1 participant