You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: reject name lookup options without symbol names - #6768
A bare --name or --symbol was parsed as an empty list and fell through to the source scan/database path. Reject an explicitly requested name lookup without names, including abbreviated options, before accessing the database or source tree. The existing empty --nid filter behavior is preserved.
Tested
macOS 27.0.1 arm64, based on main7dcfff559f68fc4ffb52f836134d3133492a3d00. 31 tests in the affected Python module pass on Python 3.12.14. The new regression also passes on Apple Python 3.9.6.
The new regression fails against the original behavior and passes with this fix. Whitespace and repository conventions checks pass. Full runtime/title execution and Windows/Linux execution were not performed locally.
Checklist
Based on current main; no other open PR implements the same functions
One topic per PR; follow-ups go in a new PR
No comments in code except technical debt
Unimplemented paths throw; silent stubs are documented where required
No notes, investigation .md files or images added to the repository
New third-party code is a submodule built from source (none added)
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
For coordination with #6790: the same explicit-empty --name/--symbol inputs currently produce different outcomes. #6790 treats them as an empty selection and avoids database/source scanning; this PR returns a usage error. Could you and that author settle one CLI contract and add a test for the cross-case before either merges? I have not found a reason the empty case must be treated differently from the already-supported explicit-empty --nid case.
Rebase handoff + one test-suite finding — rebased onto current main (authorship unchanged). The conflict in tools/nid_names.py took your rejection path (--name/--symbol requires at least one symbol name).
The finding: your rejection breaks 8 of main's nid_database_cache tests (tools/tests/test_nid_names.py, 35 tests, 8 failures) — they invoke nid_names.py with --name in the empty/no-argument forms and expect success (returncode 0), which your parser.error turns into 2. Those tests were added on main after your branch point, exercising exactly the behaviour your change forbids. So the PR needs either the tests updated to expect the rejection (if the rejection is the intended behaviour — likely, given the PR's title) or the rejection scoped to the forms the tests don't cover. Everything else passes (1337/1339: those 8 plus the known main regression agc_driver_tessellation, #4727) and conventions are green.
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
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
A bare
--nameor--symbolwas parsed as an empty list and fell through to the source scan/database path. Reject an explicitly requested name lookup without names, including abbreviated options, before accessing the database or source tree. The existing empty--nidfilter behavior is preserved.Tested
macOS 27.0.1 arm64, based on
main7dcfff559f68fc4ffb52f836134d3133492a3d00. 31 tests in the affected Python module pass on Python 3.12.14. The new regression also passes on Apple Python 3.9.6.The new regression fails against the original behavior and passes with this fix. Whitespace and repository conventions checks pass. Full runtime/title execution and Windows/Linux execution were not performed locally.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository