Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 19, 2026

Bumps github.com/goplus/gogen from 1.19.7 to 1.20.2.

Release notes

Sourced from github.com/goplus/gogen's releases.

v1.20.2

What's Changed

Full Changelog: goplus/gogen@v1.20.1...v1.20.2

v1.20.1

What's Changed

release notes:

  • break InitThisGopPkg => InitXGoPackage (incompatible changes)
  • break (*File).CheckGopDeps => CheckXGoDeps (incompatible changes)
  • break GopXXX => XGoXXX (incompatible changes)
  • break Gopx_XXX, Gop_Rcast, Gop_XXX (used in x/test, x/ng)
  • keep GopPackage (used in x, spx)
  • keep Gopt_XXX (used in spx, x/test, x/gsh)
  • keep Gop_Enum (used in x)
  • keep Gop_Exec/Gop_Env (used in x) -- supported by xgo, not gogen

changes:

Full Changelog: goplus/gogen@v1.19.9...v1.20.1

v1.19.9

What's Changed

Full Changelog: goplus/gogen@v1.19.8...v1.19.9

v1.19.8

What's Changed

Full Changelog: goplus/gogen@v1.19.7...v1.19.8

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/goplus/gogen](https://github.com/goplus/gogen) from 1.19.7 to 1.20.2.
- [Release notes](https://github.com/goplus/gogen/releases)
- [Commits](goplus/gogen@v1.19.7...v1.20.2)

---
updated-dependencies:
- dependency-name: github.com/goplus/gogen
  dependency-version: 1.20.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Jan 19, 2026
@luoliwoshang
Copy link
Member

@xgopilot bump github.com/goplus/gogen from 1.19.7 to 1.20.2 cause these problem! check what happen!

--- FAIL: TestFromTestdata (8.82s)
    --- PASS: TestFromTestdata/avoidkeyword (0.84s)
    --- PASS: TestFromTestdata/enum (0.30s)
    --- PASS: TestFromTestdata/forwarddecl (0.32s)
    --- PASS: TestFromTestdata/funcrefer (0.38s)
    --- FAIL: TestFromTestdata/gettext (0.28s)
    --- FAIL: TestFromTestdata/gpgerror (0.31s)
    --- PASS: TestFromTestdata/ignoresym (0.30s)
    --- PASS: TestFromTestdata/impls (0.34s)
    --- PASS: TestFromTestdata/include (0.29s)
    --- PASS: TestFromTestdata/isl (0.29s)
    --- FAIL: TestFromTestdata/issue507 (0.28s)
    --- FAIL: TestFromTestdata/keepcomment (0.28s)

@xgopilot
Copy link
Contributor

xgopilot bot commented Jan 20, 2026

Investigation Complete ✅

Root Cause

The gogen v1.20.2 update exposed a bug in _xtool/internal/parser/parser.go where multi-line C block comments (/* ... */) were being incorrectly split by newlines into multiple Go AST Comment nodes.

The Problem:

  • Old behavior: ["/* line1\n", " line2 */\n"] created 2 Comment nodes
  • Each Go AST Comment node must be self-contained (complete // line or complete /* */ block)
  • Split block comments generated invalid Go syntax: expected declaration, found The

The Fix

Updated ParseComment() function in _xtool/internal/parser/parser.go to:

  • Detect /* */ block comments using prefix/suffix check
  • Keep entire block comment as single Comment node
  • Preserve existing behavior for // line comments

Result:

  • New behavior: ["/* line1\n line2 */"] creates 1 Comment node ✅
  • Generates valid Go code that passes go fmt

Tests Fixed

This resolves all 4 failing tests:

  • TestFromTestdata/gettext
  • TestFromTestdata/gpgerror
  • TestFromTestdata/issue507
  • TestFromTestdata/keepcomment

Changes Pushed

Committed and pushed fix to branch dependabot/go_modules/github.com/goplus/gogen-1.20.2

The CI will now rebuild the LLGo tools with the fix and verify all tests pass.

…ibility

The gogen v1.20.2 update exposed an issue where multi-line C block
comments (/* ... */) were being incorrectly split into multiple Go AST
Comment nodes. This created invalid Go syntax because each Comment node
in Go's AST must be self-contained (either a complete // line or a
complete /* */ block).

Fixed ParseComment() to:
- Keep /* */ block comments as a single Comment node
- Preserve existing behavior for // line comments

Fixes test failures in:
- TestFromTestdata/gettext
- TestFromTestdata/gpgerror
- TestFromTestdata/issue507
- TestFromTestdata/keepcomment

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
@luoliwoshang
Copy link
Member

@xgopilot create a issue to link this pr at llcppg to report this depend update bug! and at issue make a mini reprocude for we ,run it from 1.19.7 and 1.20.2 ,to tell us different!

@xgopilot
Copy link
Contributor

xgopilot bot commented Jan 20, 2026

Creating issue to document gogen update bug

Todo List

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants