Repository navigation
fix(engine): keep unpinned Go requires visible in build and scan - #335
Closed
vibgrate-team wants to merge 2 commits into
Closed
vibgrate-team wants to merge 2 commits into
vibgrate-team wants to merge 2 commits into
Conversation
A go.mod require without a v-prefixed version never became an edge, so direct dependencies disappeared from vg build and vg scan. Record the module path and leave the version null instead of inventing a pin. Fixes #215 Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: support <support@bugben.ai>
isConcreteVersion now predicates string so an omitted require pin stays on the unknown sentinel without a type error. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: support <support@bugben.ai>
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.
Summary
vg buildandvg scandropped a direct Go module when itsgo.modrequirehad nov-prefixed version.ingestGoModonly kept lines matching\S+\s+v\S+, and the Go scanner required a second token, so an omitted pin never became an edge or a dependency row.This change keeps that module path for Go only:
importedge to the external module. Graph nodes still have no version field, so nothing is invented.currentSpecandresolvedVersionset tonull(andmajorsBehindnull). A real pin, including0.0.0or a version that does not start withv, is unchanged.versionstays the existingunknownsentinel, the purl has no@version, and the declared spec is omitted rather than written as""or a guessed pin.replace,exclude, and comments stay ignored. Indirect requires stay out of the scan's direct list, matching the scanner's existing filter, and still appear on the code graph.Related issues
Fixes #215
Checklist
pnpm testpassespnpm lintis cleanpnpm typecheckis cleangraph.json/ report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)git commit -s, DCO)Notes for reviewers
Verify with the Go fixture in
src/engine/manifests.test.tsandsrc/core-open/scanners/go-scanner.test.ts: a barerequiremodule is present,example.com/excludedandreplacetargets are not, and the unpinned row's version fields arenull.pnpm test(4901 passed),pnpm lint, andpnpm typecheckare green on this branch.