Skip to content

Use make backend in VS Code tasks.json#36887

Closed
silverwind wants to merge 2 commits intogo-gitea:mainfrom
silverwind:vstasks
Closed

Use make backend in VS Code tasks.json#36887
silverwind wants to merge 2 commits intogo-gitea:mainfrom
silverwind:vstasks

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Mar 11, 2026

The previous bare go build did not pass -ldflags, so main.Version was never set and defaulted to "development". This caused AssetVersion to always be "development", meaning browser cache was never busted between frontend rebuilds during development.

AssetVersion before: 1.26.0+dev
AssetVersion after: 1.26.0+dev-548-g6e8f78ae27

The previous bare `go build` did not pass `-ldflags`, so `main.Version`
was never set and defaulted to "development". This caused `AssetVersion`
to always be "development", meaning browser cache was never busted
between frontend rebuilds during development.

Switch to `make backend` which passes the correct ldflags including the
git-describe version string, and also simplifies the config by removing
per-platform args.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 11, 2026
@silverwind silverwind requested a review from Copilot March 11, 2026 07:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the VS Code build tasks to invoke the repo’s make backend target so development builds get the same -ldflags-derived version metadata as standard builds, which fixes asset cache busting during frontend rebuilds.

Changes:

  • Replace the VS Code “Build” task from go build to make backend.
  • Replace the VS Code “Build (with SQLite3)” task from go build -tags ... to make backend with TAGS=....

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@lafriks
Copy link
Copy Markdown
Member

lafriks commented Mar 11, 2026

there won't be make on windows, whole point for this is to work without make for local development, otherwise you can just use make already from cli imho

@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Mar 11, 2026

make is available for Windows and already a required development dependency. Not using make would be a suboptimal development experience.

I guess I can hack around and make it work without make but the point stands that it's not optimal to circumvent make.

@silverwind
Copy link
Copy Markdown
Member Author

I will check what's needed to eliminate make here, even thought I think the make-less startup process is inherently flawed.

@silverwind silverwind marked this pull request as draft March 11, 2026 13:27
@silverwind
Copy link
Copy Markdown
Member Author

This will be fixed with #36896 where there will not be any more AssetVersion problems.

@silverwind silverwind closed this Mar 13, 2026
@silverwind silverwind deleted the vstasks branch March 13, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants