Skip to content

fix(ixgo): export comparator classfile package#156

Open
MeteorsLiu wants to merge 1 commit into
xgo-dev:mainfrom
MeteorsLiu:fix/ixgo-cmp-package
Open

fix(ixgo): export comparator classfile package#156
MeteorsLiu wants to merge 1 commit into
xgo-dev:mainfrom
MeteorsLiu:fix/ixgo-cmp-package

Conversation

@MeteorsLiu

Copy link
Copy Markdown
Collaborator

No description provided.

@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: fix(ixgo): export comparator classfile package

No blocking issues. The change correctly registers github.com/goplus/llar/cmp with the ixgo interpreter so .gox comparators loaded outside a Go module can resolve their imports from the in-memory registry instead of falling back to on-disk (go/build) resolution, which fails without a module context. The new TestLoadComparator_OutsideModule exercises exactly this path via t.Chdir(t.TempDir()), and I verified the assertion matches the semver-based CJSON_cmp.gox testdata.

Verified:

  • Generated export.go matches the existing formula/export.go pattern and declares all exported symbols of cmp (CmpApp, Gopt_CmpApp_Main, GopPackage). Deps correctly lists only mod/module (the sole import of cmp/cmp.go).
  • pkgs.go blank import is alphabetized within the llar group; //go:generate directive placed beside the sibling formula directive.
  • go build ./internal/ixgo/... succeeds. filepath.Abs(...) is captured before t.Chdir, so the path resolution is correct.

Not verified: go test ./internal/modules/ could not run to completion in the sandbox due to a pre-existing ixgo link error (math/rand/v2.globalRand) unrelated to this PR.

The inline comments below are minor, optional polish only.

Comment thread internal/modules/comparator_test.go
Comment thread internal/modules/comparator_test.go
Comment thread internal/modules/comparator_test.go
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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