Skip to content

cl: conf.LoadLibcPubFile; ctx.ignoreType ignore if not exists; cl initClassTypeEx, loadClassMember, compileVar: accept unsupported type; cl loadLinkageSpec; vtableName: _xgo_vtable_XXX => X_vtable_XXX; ...; tool: cfg.GroupSubdir - #887

Merged
xushiwei merged 5 commits into
goplus:mainfrom
xushiwei:q
Oct 1, 2026

Conversation

@xushiwei

@xushiwei xushiwei commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

cl newTypeParams: fix empty param name; check unsupported features; ctx.unsafePointer; tool goFileOf: add prefix z if fname starts with _

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.67480% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.60%. Comparing base (2cfd25a) to head (c25cc3a).
⚠️ Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
cl/class.go 71.42% 14 Missing ⚠️
cl/compile.go 55.55% 4 Missing ⚠️
tool/gen.go 90.90% 3 Missing ⚠️
cl/var.go 60.00% 2 Missing ⚠️
cl/enum.go 75.00% 1 Missing ⚠️
cl/type.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #887      +/-   ##
==========================================
- Coverage   88.44%   87.60%   -0.85%     
==========================================
  Files          22       22              
  Lines        1896     1944      +48     
==========================================
+ Hits         1677     1703      +26     
- Misses        219      241      +22     
Flag Coverage Δ
llgo-tests 87.60% <79.67%> (-0.85%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review summary

This PR adds a LoadLibcPubFile option so the libc package can be imported via importPkg (loading its pub file and registering its type names into ctx.types) instead of a plain pkg.Import. It also makes importPkg return *types.Package, adds the ignoreType helper, and makes enum loading fail loudly on an ignored underlying type. The change builds and go vet ./cl/ passes cleanly.

The design is sound. A few points below are worth a look — the main one is a latent-fragility nit around the two-branch libc import, plus an intent check on the new enum panic.

Note (not inline, pre-existing): with LoadLibcPubFile=true the libc pub file is now loaded at NewPackage init, so importPkg/loadPubFile parse failures (malformed line, unsupported f/v entry, missing pub-file lookup) surface as panic/log.Panicln during init rather than degrading to the plain pkg.Import path. These panics are pre-existing in importPkg/loadPubFile and not introduced by this diff; the libc pub file is a trusted first-party artifact, so risk is low. Flagging only because this path is newly exercised at init.

Comment thread cl/compile.go
Comment thread cl/enum.go
Comment thread cl/compile.go
@xushiwei xushiwei changed the title cl: conf.LoadLibcPubFile; ctx.ignoreType ignore if not exists cl: conf.LoadLibcPubFile; ctx.ignoreType ignore if not exists; cl initClassTypeEx, loadClassMember, compileVar: accept unsupported type; cl loadLinkageSpec Oct 1, 2026
@xushiwei xushiwei changed the title cl: conf.LoadLibcPubFile; ctx.ignoreType ignore if not exists; cl initClassTypeEx, loadClassMember, compileVar: accept unsupported type; cl loadLinkageSpec cl: conf.LoadLibcPubFile; ctx.ignoreType ignore if not exists; cl initClassTypeEx, loadClassMember, compileVar: accept unsupported type; cl loadLinkageSpec; vtableName: _xgo_vtable_XXX => X_vtable_XXX; ...; tool: cfg.GroupSubdir Oct 1, 2026
@xushiwei
xushiwei merged commit d4f12d3 into goplus:main Oct 1, 2026
2 of 4 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