Skip to content

MacOS make check-source fixes - #9379

Merged
daywalker90 merged 1 commit into
ElementsProject:masterfrom
sangbida:sangbida/check-source-fixes
Aug 6, 2026
Merged

MacOS make check-source fixes#9379
daywalker90 merged 1 commit into
ElementsProject:masterfrom
sangbida:sangbida/check-source-fixes

Conversation

@sangbida

@sangbida sangbida commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Drop obsolete x"$1" idiom in compacter-slow.sh (ShellCheck SC2268).

CI does not hit these, so the failures show up mainly for local macOS contributors.
Changelog-None

Shellcheck 0.11 (SC2268) rejects the old x"$1" comparison idiom.

Prevents: "tests/plugins/compacter-slow.sh:5:6: note: Avoid x-prefix in comparisons as it no longer serves a purpose. [SC2268]"
@sangbida
sangbida requested a review from ddustin August 5, 2026 06:12
@sangbida
sangbida marked this pull request as ready for review August 5, 2026 06:12
@sangbida
sangbida requested a review from daywalker90 August 5, 2026 06:12
@daywalker90

Copy link
Copy Markdown
Collaborator

I can not reproduce the check-source issue in the macos runner: daywalker90#47

It gives me the same output as on my own debian machine. What is the exact command you use for check-source ?

Afaik it should be:

uv run gmake check-source

@sangbida

sangbida commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Hey @daywalker90,

I was able to reproduce the issue in CI here:
sangbida#1

I usually run uv run make but I ran uv run gmake as well and found that I encountered the same issue locally:

lightning % uv run gmake check-source
Building version v26.06-229-ga71d64c
/bin/sh: line 0: test: -ge: unary operator expected
checking common source
checking common headers
tests/plugins/compacter-slow.sh:5:6: note: Avoid x-prefix in comparisons as it no longer serves a purpose. [SC2268]
gmake: *** [Makefile:631: check-shellcheck] Error 1

I believe the reason it might work on your test branch is because you have cherry-picked my changes :)

@daywalker90

Copy link
Copy Markdown
Collaborator

Oh oops my answer was quite misleading. I meant the docs changes. gpatch does not seem to be necessary, unless the github runners come with it preinstalled? And the PATH changes also were not necessary. The error you can see on my PR run and that i see:

/bin/sh: .tmp.lightningrfc/tools/extract-formats.py: No such file or directory
rm wire/peer_wire.csv.raw
gmake: *** [wire/Makefile:54: wire/peer_wire.csv.raw] Error 127

is one that i noticed for a while now, but have not reported yet. I double checked locally on master where i get this same error. My runs don't seem to get as far as yours to hit that shellcheck error.

So i approve of the changes in f371741 but i don't see the need for 3a0e1f5

@daywalker90

Copy link
Copy Markdown
Collaborator
/bin/sh: .tmp.lightningrfc/tools/extract-formats.py: No such file or directory
rm wire/peer_wire.csv.raw
gmake: *** [wire/Makefile:54: wire/peer_wire.csv.raw] Error 127

I fixed this with:

-check-wire-format: extract-bolt-csv
+check-wire-format: bolt-precheck
+       @if [ -d .tmp.lightningrfc ]; then $(MAKE) extract-bolt-csv; else echo "Not checking BOLTs: BOLTDIR $(BOLTDIR) does not exist" >&2; fi
        git diff --exit-code HEAD -- wire

Noteably i get no error at all on master now. What shellcheck version are you using?

I have 0.10.0

@sangbida
sangbida force-pushed the sangbida/check-source-fixes branch from 3a0e1f5 to f371741 Compare August 6, 2026 04:03
@sangbida

sangbida commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@daywalker90 I have dropped the second commit and updated the PR description.

I'm running shellcheck version 0.11.0.

@daywalker90
daywalker90 merged commit 5c8bf78 into ElementsProject:master Aug 6, 2026
45 of 59 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.

2 participants