Repository navigation
TinyGo branch: catch up with jackielii/main (#40), fix what it exposed, skill and CI for TinyGo - #2
Merged
Merged
Conversation
…ackielii#40) ID, IDTarget and RenderTarget.Is matched a bound method value (p.List) to its page by the receiver's bare type name, dropping the package. With same-named page types in two packages, as with a Page type per package, a bound value errored as ambiguous with no current page, and silently took the current page's id when that was the other package's type. The htmx and method render targets had the same confusion in Is. boundReceiverFromFuncName now keeps the package path from the function name, unescaping its last element ("yaml%2ev3"), and methodInfo.receiverIs matches bound values on package path and type name, so they resolve as exactly as method expressions. A generic value receiver "Gen[...].M-fm" now parses to "Gen[...]" rather than "Gen[". Not-found errors name the type by package path for both forms. A function counted as a bound method value whenever its name contained "-fm", so a standalone function in a package path such as "go-fmt..." failed. Only the "-fm" suffix counts now. Fixes jackielii#39 Claude-Session: https://claude.ai/code/session_01NpjJeP32ycvAHNFXRgTviG
…ielii#40) Conflicts in render_target.go and id_for.go: jackielii#40's matching (methodInfo.receiverIs, now with the package path) through this branch's TinyGo-safe helpers (funcNumIn, funcIn, methodByName). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97
A package with only standalone component functions (internal/fn-fmt, from jackielii#40) got an unused reflect import, which doesn't compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97
When to regenerate the tables, the build's tags, the stale-table error, and the mux TinyGo needs, so an agent using only the skill keeps a TinyGo build working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97
structpages-lint reports [region] since v0.9.0; the skill's category table and lint summary didn't list it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97
The skill has changed a lot since 0.2.0 (gsx, v0.9's render targets, lint, TinyGo); a new version lets an installed plugin pick it up. The marketplace entry said MIT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97
Type.MethodByName panics under TinyGo; the other tests use the helper, which reads the tables there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97
The script generates the tables for TinyGo's own files (-tags tinygo) and runs tinygo test; CI runs the same script. TinyGo's net/http mux lacks Go 1.22 patterns (tinygo-org/net#55). The 11 tests that route them through it skip only when a probe of the mux says it can't: Go 1.22 patterns, and an escaped / kept in one wildcard segment (which tinygo-org/net#56 alone doesn't fix). On standard Go nothing skips; under TinyGo they run again by themselves once its mux catches up. TinyGo 0.43: 732 pass, 14 skip (11 these, 3 reflect-only as before), 0 fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97
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.
Brings the fork's
tinygobranch up to date and closes the tooling gaps found in joeblew999/go-htmx4#132. Fast-forward:tinygois fully contained, nothing on it is lost. Nothing here goes to jackielii.Commits
render_target.go,id_for.go), resolved as fix: match bound method values by package path, not bare type name jackielii/structpages#40's matching (methodInfo.receiverIs, package path included) through this branch's TinyGo-safe helpers (funcNumIn,funcIn,methodByName).internal/fn-fmthas only component functions; its tables file got an unusedreflectimport, so the tables build didn't compile.methodByName.Type.MethodByNamepanics under TinyGo.structpages-gensection, a key rule, and a description that triggers on TinyGo work; theregionlint category in the reference table.docs/tinygo.mdsays the tables file can be committed or generated in the build.LICENSEsays.scripts/tinygo-test.sh(the same command locally). The 11 tests that route Go 1.22 patterns through net/http's mux skip only when a probe says that mux can't route them. Today that's TinyGo's (http: ServeMux mishandles {wildcard...}, {$}, and method-prefixed patterns tinygo-org/net#55). On standard Go nothing skips.Checked locally
mise run upstream:check): pass.structpages-gen -test,go test -tags structpages_tables ./...): pass.scripts/tinygo-test.sh): 732 pass, 14 skip (11 routing, 3 reflect-only as before), 0 fail. It was 11 fail, and after the merge a compile error and a panic.CI here runs only on PRs into
main, so these local runs are the proof for this PR.Next, on its own branch: the routing rewritten so both compilers route the same way (routes registered the older way, matching done by structpages), so the 11 routing tests pass under TinyGo instead of skipping, with every example checked on Go and TinyGo. Tracked in joeblew999/go-htmx4#132.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QDsbiFrZ6KW65Pectt3h97