deps: bump radiance for build stamping + jsDelivr config mirror - #8928
Conversation
Picks up radiance#556 (log build identity + linked getlantern dep versions in every build) and radiance#575 (race a jsDelivr mirror for fronted.yaml.gz, reachable from China where raw.githubusercontent.com is blocked). Injects the new common.BuildTime / common.Commit ldflags from the Makefile — the lantern-side half of radiance#556. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe Radiance dependency is updated in ChangesRadiance build metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 75-80: Make BUILD_TIME generation in the Makefile compatible with
OS=Windows_NT while preserving the existing UTC RFC3339 timestamp format for
non-Windows builds. Use the Windows-specific timestamp command in the BUILD_TIME
assignment, leaving GIT_REVISION and EXTRA_LDFLAGS behavior unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 441c6a67-d0cb-4a5a-b8b2-f4b4faaf0eda
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (2)
Makefilego.mod
There was a problem hiding this comment.
Pull request overview
This PR updates the github.com/getlantern/radiance dependency to a newer main commit and updates Lantern’s build/linker flags so Radiance can log build identity (version + build time + commit) at startup, making shipped binaries self-describing in logs.
Changes:
- Bump
github.com/getlantern/radiancetov0.0.0-20260725142156-584a0568abac. - Stamp build time (UTC RFC3339) and commit (short SHA) into Radiance via new
-ldflags -Xvalues in the Makefile. - Commit accompanying
go.sumupdates fromgo mod tidy.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Makefile | Adds build-time and commit stamping via EXTRA_LDFLAGS for Radiance startup identity logging. |
| go.mod | Bumps Radiance module version to the new pseudo-version. |
| go.sum | Updates checksums for the new Radiance pseudo-version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- BUILD_TIME: date -u is POSIX and doesn't work under the cmd.exe shell make uses on Windows_NT (where recipes already rely on powershell), so Windows artifacts would stamp an empty common.BuildTime. Branch on OS=Windows_NT and use powershell, matching the existing Windows handling for APP_VERSION and the file ops. - GIT_REVISION: pin git rev-parse --short=7 (as scripts/ci/version.sh already does) so common.Commit length is stable regardless of the repo's core.abbrev. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
| BUILD_TIME := $(shell date -u +%Y-%m-%dT%H:%M:%SZ) | ||
| endif | ||
| GIT_REVISION := $(shell git rev-parse --short=7 HEAD) | ||
| EXTRA_LDFLAGS ?= -X '$(RADIANCE_REPO)/common.Version=$(APP_VERSION_PUBSPEC)' -X '$(RADIANCE_REPO)/common.BuildTime=$(BUILD_TIME)' -X '$(RADIANCE_REPO)/common.Commit=$(GIT_REVISION)' |
There was a problem hiding this comment.
Leaving this for @myleshorton to decide rather than changing it here — it's not an active bug and the fix changes the intended override semantics. Nothing in the repo, workflows, or scripts sets EXTRA_LDFLAGS today (the only reference is this ?= line), so the stamp flags are always applied in every current build path. The ?= is a deliberate full-override idiom; splitting mandatory stamp flags from optional extras (always including the stamps, appending extras) is a reasonable hardening toward the self-describing-binary goal, but it removes a caller's ability to fully suppress the stamps — a design call that's yours to make. Leaving this thread open for your input.
git rev-parse yields an empty string in a source tree with no .git, producing an empty common.Commit and dropping the build-identity signal. Fall back to "unknown" via $(or ...). Pure-make so it works under both the cmd.exe and POSIX shells the Makefile targets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
| ifeq ($(OS),Windows_NT) | ||
| BUILD_TIME := $(shell powershell -NoProfile -ExecutionPolicy Bypass -Command "[DateTime]::UtcNow.ToString('yyyy-MM-ddTHH:mm:ssZ')") | ||
| else | ||
| BUILD_TIME := $(shell date -u +%Y-%m-%dT%H:%M:%SZ) | ||
| endif | ||
| ## Fall back to a sentinel so common.Commit is never empty (e.g. a build from a | ||
| ## source tree with no .git); an empty -X value would drop the build-identity | ||
| ## signal from logs. | ||
| GIT_REVISION := $(or $(strip $(shell git rev-parse --short=7 HEAD)),unknown) | ||
| EXTRA_LDFLAGS ?= -X '$(RADIANCE_REPO)/common.Version=$(APP_VERSION_PUBSPEC)' -X '$(RADIANCE_REPO)/common.BuildTime=$(BUILD_TIME)' -X '$(RADIANCE_REPO)/common.Commit=$(GIT_REVISION)' |
There was a problem hiding this comment.
Leaving this for @myleshorton — it's cosmetic and doesn't occur in any lantern build path. Every lantern build (CI and local) runs from a git checkout at the repo root, so git rev-parse succeeds and writes only the SHA to stdout; the fatal stderr line only appears in a no-.git tree, which we don't build from. The value is already safely unknown in that case.
Worth noting there's no git-native way to silence it: git rev-parse --verify --quiet suppresses ref-resolution errors but not "fatal: not a git repository", which comes from repo discovery before that flag applies (verified). So the redirect has to be OS-branched (2>/dev/null vs 2>NUL) since the Makefile targets both the POSIX and cmd.exe shells — machinery for a case that can't happen here.
If you do want to harden it, the clean cross-platform option is a pure-make guard that skips git entirely when there's no repo:
GIT_REVISION := $(if $(wildcard .git),$(or $(strip $(shell git rev-parse --short=7 HEAD)),unknown),unknown)
(caveat: assumes make runs from the repo root, which the Makefile already assumes for pubspec.yaml/version.sh). Your call — leaving the thread open.
What
eea72f0→584a056(latest main), picking up:getlantern/*dep (plus sing-box) at Info in every build, withreplacedirectives surfaced. A shipped binary is now self-describing in logs.fronted.yaml.gz;raw.githubusercontent.comis blocked in China, and jsDelivr is served from a non-getlantern mirror account since jsDelivr bans the getlantern org.common.BuildTime(UTC RFC3339) andcommon.Commit(short rev) ldflags — the lantern-side half of radiance#556. Verified the resolved flags:Why
A 9.1.14 iOS TestFlight build shipped a pre-fix keepcurrent despite go.mod declaring the fixed version, and nothing in the logs revealed it. With this bump every build logs what was actually linked, so a stale-cache build is visible in the first lines of any user log instead of silent.
go mod tidyrun; go.mod and go.sum committed together.🤖 Generated with Claude Code
Summary by CodeRabbit