Repository navigation
chore(deps)!: build against NSGo main and migrate core.FlexShrink - #2723
Merged
Merged
Conversation
Moves the game layer, the tools module and the sample games from NSGo v0.4.0 to NSGo main at 8e5c1cc (v0.4.1-0.20261201013927-8e5c1cc14ee7), so a project that requires NSGo main, such as for nsgo.WindowMaximized (nsgo-dev/nsgo#2822), can build the game layer. NSGo's only breaking change since v0.4.0 (nsgo-dev/nsgo#2739) makes core.Style.FlexShrink a core.FlexShrink and shrinks growing boxes, scroll views along their scroll axis and the auto-sized boxes around them by default. Every numeric factor keeps its value: FlexShrink: 1 becomes core.Shrink(1) and FlexShrink: 0 becomes core.NoShrink (906 sites in pkg/editor, pkg/scene, pkg/online/admin/console, internal, the templates and their embedded copies, and the examples), and the docs and the nsgo-game skill show the new form. The operator console's embedded web build is regenerated for the new sources and NSGo version. go mod tidy also adds the indirect requirements the examples were missing for nsgo's cmd/nsgo tool (quic-go and friends) and lists modelcontextprotocol/go-sdk as a direct requirement of the tools module, which imports it. BREAKING CHANGE: the game layer requires an NSGo newer than v0.4.0, whose core.Style.FlexShrink is a core.FlexShrink.
Every template required github.com/nsgo-dev/game at eee96e7 with NSGo v0.4.0, while the template code now writes core.Shrink and core.NoShrink, which only NSGo main has, and game at eee96e7 does not build against NSGo main. Pin them all, and the copies game new embeds, to the previous commit (v0.3.1-0.20261201021414-a2876d276c9e), which builds against NSGo main, with NSGo v0.4.1-0.20261201013927-8e5c1cc14ee7, and regenerate go.sum with GOWORK=off go mod tidy. The release step repins them to the released game version. Adds the changelog fragment and a note on the migration and the pin, and updates the NSGo version the nsgo-game skill says the templates require.
houko
added a commit
to nsgo-dev/orbit-academy-game
that referenced
this pull request
Dec 1, 2026
…ayer main Move to nsgo main (8e5c1cc), which opens the main window maximized from its first frame (nsgo-dev/nsgo#2822) and brings the environment refresh (nsgo-dev/nsgo#2821) and sprite-frame crop cache (nsgo-dev/nsgo#2817) fixes, and to the game layer main (be78552), which builds against it (nsgo-dev/game#2723). Replace maximizeOnce, which waited for the first window frame to toggle maximize, with nsgo.WindowMaximized in main.go, and migrate the one numeric FlexShrink to core.Shrink.
houko
added a commit
to nsgo-dev/orbit-academy-game
that referenced
this pull request
Dec 1, 2026
…ayer main (#5) Move to nsgo main (8e5c1cc), which opens the main window maximized from its first frame (nsgo-dev/nsgo#2822) and brings the environment refresh (nsgo-dev/nsgo#2821) and sprite-frame crop cache (nsgo-dev/nsgo#2817) fixes, and to the game layer main (be78552), which builds against it (nsgo-dev/game#2723). Replace maximizeOnce, which waited for the first window frame to toggle maximize, with nsgo.WindowMaximized in main.go, and migrate the one numeric FlexShrink to core.Shrink.
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.
Summary
toolsand the ten example modules from NSGo v0.4.0 to NSGo main at 8e5c1cc (v0.4.1-0.20261201013927-8e5c1cc14ee7), regeneratinggo.sumwithgo mod tidy. Tidy also adds the indirect requirements of nsgo'scmd/nsgothatcaverun,starburst,fountainandobservatorywere missing, and listsmodelcontextprotocol/go-sdkas a direct requirement oftools, which imports it.core.Style.FlexShrinkto thecore.FlexShrinktype that feat(core)!: shrink growing boxes and scroll views by default nsgo#2739 introduced. There are 906 sites: 278FlexShrink: 1becomecore.Shrink(1)and 628FlexShrink: 0becomecore.NoShrink. They are inpkg/editor(835),pkg/scene,pkg/online/admin/console,internal/repocheck, the templates and theirinternal/gamecli/_templatescopies, and the examples. Threest.FlexShrink = 0and two= 1assignments are migrated the same way. The docs (en and zh) and the nsgo-game skill now show the new form. Each factor keeps its old value; the upstream advice to dropFlexShrink: 1next toFlexGrow: 1is left for a separate cleanup.pkg/online/admin/console/dist,dist.inputs) for the changed sources and NSGo version.go.mod.tmpl, and the embedded copies, to the first commit's game pseudo-version (v0.3.1-0.20261201021414-a2876d276c9e) with NSGo main, and regenerates theirgo.sumwithGOWORK=off go mod tidy. The release step repins them to the released version, as the template pin policy note describes..agents/notes/implemented/process/2026-12-01-nsgo-main-flexshrink-upgrade.md.Why now
A project that requires NSGo main, for example for
nsgo.WindowMaximized(nsgo-dev/nsgo#2822), cannot build the game layer today. MVS picks NSGo main, andpkg/scene/hud3d.go:300and the rest of the numericFlexShrinksites stop compiling. nsgo-dev/nsgo#2739 is the only breaking commit between v0.4.0 and NSGo main at 8e5c1cc. After this change,go veton the root module reports nothing else.The templates have to move in the same change.
game newfrommainembeds the template code and requires game atmain, which now requires NSGo main, so that code must use the new API. CI'stemplatesjob builds each template against its pinned game version, and the only version that builds against NSGo main is this branch's first commit. That is why the templates pin it. GitHub keeps the pull request's head commits reachable, so the pseudo-version still resolves after a rebase merge.Behavior: by NSGo's new default, growing boxes, scroll views along their scroll axis and auto-sized wrappers around them that set no factor now shrink. Explicit factors are unchanged. No golden image or screenshot test changed.
Testing
All runs were on the Mac Studio via
rbuild. Its system disk was full (230 MB free), so test runs usedTMPDIR/GOTMPDIRon/Volumes/Workspace. An earlier run with the default temp dir failed 27 tests, all withno space left on device.go tool nsgo test ./... -- -timeout=40m(root): 8108 passed, 0 failed, 10 skipped. The skips are Postgres, fish and an existing viewport-capture skip.go tool nsgo check: passed.go tool nsgo test ./internal/gamecli, which builds new projects from every template against this checkout: passed with the second commit's pins.tools:go tool nsgo test ./...passed.caverun,cryptquest,dedicatedserver,fieldmedic,fountain,lantern3d,observatory,slidegem,starburst,tutorial):go tool nsgo test ./...passed.templatesjob tests them: copy out of the workspace, rendergo.mod,GOWORK=off go tool nsgo test ./...against the pinned game pseudo-version from the proxy. All passed.go run ./tools/changelog check: passed.go run ./pkg/online/admin/console/internal/consolebuild -check: passed.bun run verify-notes: passed.Screenshots
None.