Skip to content

Lua hot reload: a -build -luaHotReload takes the run arguments, not the build-only ones - #1559

Merged
Frotty merged 1 commit into
masterfrom
lua-hot-reload-cli-build
Oct 24, 2026
Merged

Frotty merged 1 commit into
masterfrom
lua-hot-reload-cli-build

Conversation

@Frotty

@Frotty Frotty commented Oct 24, 2026

Copy link
Copy Markdown
Member

Problem

Main adds the workspace's wurst_run.args to the command line. Under -build it also turns the build-only + lines into flags. A new project's wurst_run.args has +opt, +inline and +localOptimizations, and -luaHotReload refuses -inline and -opt, so the command-line hot reload documented in docs/LUA_HOT_RELOAD.md (-build ... -luaHotReload, then LuaHotReloadSession start/send) failed on a default project:

java.lang.IllegalArgumentException: -luaHotReload is for development builds: remove -inline and -opt.

grill run --hot and grill reload (wurstscript/WurstSetup#87) build this way, so they failed on every default project too. The language server's hot run was not affected: a run takes only the shared - lines.

Change

A -build whose command line asks for -luaHotReload takes the run arguments of wurst_run.args (the shared - lines) and not its build-only + lines. A release -build is unchanged. The docs sentence on the command-line path says so.

Validation

  • MainTests.hotReloadBuildTakesTheRunArgumentsNotTheBuildOnlyOnes: with a new project's wurst_run.args, a -build -luaHotReload takes -stacktraces and none of -opt, -inline, -localOptimizations; a plain -build still takes all of them. It failed before the change (-opt was taken).
  • MainTests and WurstCommandsTests pass locally (Windows).
  • A small Lua project with the default wurst_run.args, built with -build -lua -luaHotReload: the master jar fails with the error above; a jar of this branch builds and writes _build/luaHotReload/manifest.json.

Not covered: -luaHotReload written into wurst_run.args itself (rather than given on the command line) is still combined with the + lines of a release build and refused, with the message above.

…he build-only ones

The command line added the build-only '+' lines of wurst_run.args to every -build. A new project's file has
+opt, +inline and +localOptimizations, which -luaHotReload refuses, so the documented command-line hot reload
failed on a default project ("-luaHotReload is for development builds: remove -inline and -opt."). A hot
reload build is a development build of the map a hot run starts, and takes the run arguments.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T17:39:07.808835Z 95293be PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty
Frotty merged commit ed9e384 into master Oct 24, 2026
2 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