Skip to content

cmd: llimport - #704

Merged
xushiwei merged 1 commit into
goplus:devfrom
xushiwei:q
Sep 11, 2026
Merged

cmd: llimport#704
xushiwei merged 1 commit into
goplus:devfrom
xushiwei:q

Conversation

@xushiwei

Copy link
Copy Markdown
Member

No description provided.

@xushiwei
xushiwei merged commit d62a300 into goplus:dev Sep 11, 2026
2 checks passed

@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: PR #704

Small, clean, well-scoped change. Adds a new dev CLI cmd/llimport/import.go that imports a Go package and prints its exported scope members, and removes an outdated usage comment in cmd/llcppdump/cppdump.go.

Assessment

  • The packages.NewImporter(nil, workDir) usage matches the established pattern in cl/compile_test.go:62; license header and structure are consistent with sibling cmd/ tools.
  • Argument parsing correctly handles the optional workDir with a sensible default.
  • The inline usage strings are accurate; no README references these internal tools, so no docs update is needed.
  • Security / Performance / Documentation: no issues found.

Optional (non-blocking)

  • Error/usage output goes to stdout and returns with exit code 0. For script-friendliness, consider routing to stderr with a non-zero exit. Note this matches the pre-existing convention in cppdump.go, so it's a codebase-wide style point rather than a regression.
  • scope.Names() order is unspecified; sort before printing only if the output is ever used for diffing/golden comparisons. Fine as-is for an ad-hoc inspection tool.

No blocking issues.

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