Repository navigation
refactor(census): export StripModelSource directly instead of forwarding to an unexported twin - #1495
Merged
Merged
Conversation
…ing to an unexported twin Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
Author
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
tools/census/grammarkept two names for one function: the unexportedstripModelSourceheld the implementation, and the exportedStripModelSourcewas a one-line forwarder to it fortools/census/metaclassmap. The implementation is now exported asStripModelSource(keeping its doc comment); the two internal callers (buildLiteralIndexincorpus.goandliteral.go) and the tests use it directly, and the forwarder is gone. Behaviour is unchanged — same signature, same body, same external caller.How it was verified
Run from the
toolsmodule (where the change lives) and from the repository root:TestStripModelSourceandTestStripModelSourceUnterminatedintools/census/grammarnow exercise the exported function directly.Checklist
make testandmake lintpass locally (go build,go vet,gofmt -l,go test ./...in both modules as above)changes/unreleased/strip-model-source-forwarder.changed.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (no count moved)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/05456a63661b43d288ec073855f3514c
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/05456a63661b43d288ec073855f3514c?variant=devin
Requested by: @HuiJun