Skip to content

refactor(repl): call nsmerge.MemberName directly instead of a forwarding alias - #1493

Merged
HuiJun merged 1 commit into
developfrom
refactor/repl-member-name-alias
Oct 25, 2026
Merged

HuiJun merged 1 commit into
developfrom
refactor/repl-member-name-alias

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What and why

memberName in internal/frontend/repl/declnames.go only forwarded to nsmerge.MemberName — no argument binding, no conversion. The package already imports nsmerge in every file that used the alias and calls its other helpers (SoleNamespace, Chain, BodyMembers) directly, so the alias was one extra hop for readers. The five call sites (declnames.go ×2, merge.go, notices.go ×2) now call nsmerge.MemberName directly and the alias is deleted. Same function, arguments and result; no behaviour change.

How it was verified

Pure refactor; the existing internal/frontend/repl tests cover the call sites (declared-name listing, reopened-namespace merging, replaced/lost-member notices).

$ go build ./...        # clean
$ go vet ./...          # clean
$ gofmt -l .            # (nothing)
$ python3 scripts/changelog.py check   # ok
$ go test -count=1 -timeout 60m ./...  # 122 packages ok, 0 FAIL
ok  	github.com/Open-MBEE/OpenSysML/internal/frontend/repl	130.903s

A first go test ./... without -timeout hit Go's 10 min default in tests/codegen (TestCompiledStepBudgetMatchesInterpreter under full-suite load); the -timeout 60m rerun above passes it in 691 s.

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change — none needed; existing REPL tests exercise every call site
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md) — no user-facing surface
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved — no count moved
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/371ad3c7f2744fffa364dffd5e04f82e
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/371ad3c7f2744fffa364dffd5e04f82e?variant=devin
Requested by: @HuiJun

…ing alias

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 25, 2026 04:15

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@HuiJun
HuiJun merged commit 111a59a into develop Oct 25, 2026
56 checks passed
@HuiJun
HuiJun deleted the refactor/repl-member-name-alias branch October 25, 2026 07:32
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