Repository navigation
Conversation
The build, install and build/debug targets unconditionally depend on build-webui, so building from source needs a Node.js/pnpm toolchain even when the web UI is not wanted. The no-webui code path already exists (webui/assets_stub.go, and 'git-bug webui' reports a helpful error), so make it reachable. Default behaviour is unchanged; WEBUI=0 skips build-webui and drops the webui build tag. //:INSTALLATION.md: document the pnpm requirement and the opt-out.
Declaring it as an empty target put WEBUI_DEP ahead of 'all', so `make WEBUI=0` exited with 'Nothing to be done' without building.
Author
|
Good catch — that's a real P1, and it's now fixed in Reproduced before the fix:
Also confirmed a real |
Author
|
The pasted console blocks got eaten by shell quoting on my end — here they are again: Reproduced before the fix: After |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1578.
What was broken
//:INSTALLATION.mdlisted onlygit,goandmakeas build dependencies,but
//:Makefilemadebuild,installandbuild/debugdepend onbuild-webui, which runspnpm install && pnpm run build. On a minimal systemthe documented set is therefore not sufficient, and the docs offered no way to
build without the frontend toolchain.
The no-web-ui code path already exists —
//webui:assets_stub.goprovidesAvailable = falseunder the!webuibuild tag, andgit-bug webuireports ahelpful error naming
make build/make install— it just wasn't reachablefrom the Makefile.
What this fix does
WEBUIvariable to//:Makefile(default1, so default behaviour isbyte-identical).
WEBUI=0drops thewebuibuild tag and removes thebuild-webuiprerequisite frombuild,installandbuild/debug.pnpmas a dependency of the default build, and adds a Buildingwithout the web UI section covering the opt-out.
Testing
make -n build,make -n install,make -n build/debugandmake -nwithno variable are unchanged from
trunk.make -n build WEBUI=0(and the same for the other targets) emits exactlygo generateplus the taglessgo build/go install, with nopnpmstep.go build -ldflags "..." -o /tmp/gitbug-nofb .compiles clean with no web UI,
git-bug versionreports normally, andgit-bug webuifails with the intended "this binary was built without the webUI" message.
go build ./...,go vet ./webui/... ./commands/..., andgo test ./webui/... ./commands/...all pass.Note
This changes no Go code — the
!webuibuild tag path was already compiled andtested on
trunk, sincego build/go installomit the tag by default.//.goreleaser.yamlbuilds the frontend and passes thewebuitag itself, soreleases are unaffected.

Confidence Score: 5/5
The PR appears safe to merge; the previous default-target issue is fixed.Summary
The PR adds
WEBUI=0to skip the frontend toolchain when building or installing.INSTALLATION.mddocuments Node.js, pnpm, and the opt-out.Reviews (2) · Last reviewed commit: "Makefile: assign WEBUI_DEP= so 'all' sta..." · Reviewed by Greptile