Commit b707b1d
authored
fix: remove stray newline from burr/examples symlink target (#748)
* fix: remove stray newline from burr/examples symlink target
The burr/examples symlink was committed with target '../examples\n'
(12 bytes) instead of '../examples' (11 bytes). Most tools tolerate
the trailing newline, but stricter consumers (Java's FileReader via
Apache RAT, some Linux extractors of the source tarball) treat
'../examples\n' as a literal nonexistent target and fail.
Manifested in CI as a RAT crash on the source tarball produced by
git-archive: the symlink in the tarball points to '../examples\n',
which doesn't resolve, and RAT raises FileNotFoundException trying
to read it as a file.
Recreate the symlink via 'rm burr/examples && ln -s ../examples
burr/examples' to write the correct 11-byte target.
* fix: fail license verification when Apache RAT exits non-zero
Previously, if RAT crashed partway through scanning (e.g. on the
broken burr/examples symlink that motivated this PR), the verify
script would print a warning, parse the truncated XML report, find
zero unapproved licenses in whatever RAT managed to scan before the
crash, and report success.
That false green is what hid the symlink corruption when PR #745
merged into main, even though our release-validation workflow
technically ran on main. The CI run scanned 14 files (out of ~700),
saw RAT exit code 1, swallowed it, and called the build green.
Treat any nonzero exit from RAT as a hard failure of license
verification. Print the last 25 lines of RAT stderr so the next
debug session has the trace immediately.
* fix: exclude burr/examples symlink from end-of-file-fixer pre-commit hook
end-of-file-fixer mistreats the symlink as a regular text file and
appends '\n' to the link target, turning '../examples' (11 bytes) into
'../examples\n' (12 bytes). Strict consumers (Apache RAT, Linux tar
extractors) then fail to resolve the symlink. This is exactly the bug
that motivated PR #748 — without this exclude, the next pre-commit run
on a maintainer's machine would silently re-corrupt the symlink.
Also exclude trailing-whitespace defensively for the same reason.1 parent ff76817 commit b707b1d
4 files changed
Lines changed: 22 additions & 5 deletions
File tree
- .github/workflows
- burr
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
322 | 330 | | |
323 | 331 | | |
324 | 332 | | |
| |||
0 commit comments