Skip to content

ci: compile the pbr.user.*.uc scripts against ucode master - #200

Merged
egc112 merged 1 commit into
mossdef-org:1.2.4from
egc112:pbr-1.2.4-lint-user-scripts
Oct 21, 2026
Merged

egc112 merged 1 commit into
mossdef-org:1.2.4from
egc112:pbr-1.2.4-lint-user-scripts

Conversation

@egc112

@egc112 egc112 commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

ucode fe9e2947 (2026-09-04, jow-/ucode#433) turns adjacent template literals into a syntax error:

let s = `line one\n`
        `line two\n`;   // now: "Adjacent template literals are not implicitly concatenated"

OpenWrt main picked this up on 2026-10-19 (ucode d2e8b8d, openwrt a4e922953c); 25.12 still runs 85922056 and is not affected. owut broke on it and was fixed in efahl/owut@9fd6be9f22. So newer ucode no longer accepts everything older ucode accepts.

pbr is clean today. Checked with a host build of d2e8b8d: all 17 tracked .uc files compile, luci.pbr compiles, and tests/run_tests.sh passes 75/75.

The gap this closes. The "Lint ucode modules" step in openwrt-release.yml already compiles the 9 modules and cli.uc against ucode master on every push and PR. That catches this kind of break in those files. It did not compile the user scripts in files/usr/share/pbr/ (pbr.user.aws.uc, pbr.user.netflix.uc), and no test loads them. This PR adds them through a glob, so future user scripts are covered too.

It also corrects the "newer ucode accepts everything older accepts" comments in ucode-syntax.yml and tests/check-ucode-syntax.sh. Both now point to the lint step for the other direction.

Tested by running the edited step locally with ucode d2e8b8d:

  • real tree: all 12 checks ok, exit 0;
  • an adjacent pair appended to a copy of pbr.user.aws.uc: the step fails with the error above, exit 1.

Not changed: the module lines' -cdynlink=fs,uci,ubus prints Unrecognized -c flag "uci" / "ubus". ucode takes one module per dynlink=, so only fs is applied. It is harmless noise and predates this PR.

ucode fe9e2947 (2026-09-04, now in OpenWrt main as ucode d2e8b8d) turns
adjacent template literals into a syntax error, so newer ucode no longer
accepts everything older ucode accepts. owut broke on exactly this and was
fixed in efahl/owut 9fd6be9f22.

The lint step in openwrt-release.yml already compiles the modules and
cli.uc against ucode master on every push and PR, but not the user
scripts in files/usr/share/pbr/, and no test loads them. Add them via a
glob so new user scripts are covered too.

Also correct the "newer ucode accepts everything older accepts" comments
in ucode-syntax.yml and check-ucode-syntax.sh, and point to the lint step
for the other direction.

Tested with a host build of ucode d2e8b8d: all 12 files pass; with an
adjacent pair appended to pbr.user.aws.uc the step fails with
"Adjacent template literals are not implicitly concatenated".

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@egc112
egc112 merged commit 71afd5e into mossdef-org:1.2.4 Oct 21, 2026
3 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