Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allowlist for goals from file nodes #5950

Open
zrlk opened this issue Dec 4, 2023 · 3 comments
Open

Add allowlist for goals from file nodes #5950

zrlk opened this issue Dec 4, 2023 · 3 comments
Assignees
Labels
verifier Issues with the Kythe verifier

Comments

@zrlk
Copy link
Contributor

zrlk commented Dec 4, 2023

When goals are read from file nodes, we've seen cases where comments are unintentionally interpreted as containing assertions (even when users provide a goal_regex to avoid this problem). It would be useful to add an allowlist to select which (VName) paths should be searched for goals. (It would also be helpful to clear up the diagnostics printed when reading these goals, as the vname() dump before the bison message looks suspiciously like an internal error.)

@zrlk zrlk added the verifier Issues with the Kythe verifier label Dec 4, 2023
@zrlk zrlk self-assigned this Dec 4, 2023
@shahms
Copy link
Contributor

shahms commented Dec 5, 2023

Isn't the existing mechanism of reading goals from files specified on the command line, rather than file nodes, essentially this?

@zrlk
Copy link
Contributor Author

zrlk commented Dec 5, 2023

Not exactly. This is the state of the world (and may not be ideal):

Reading goals from file nodes and reading goals from files passed as command-line arguments are mutually exclusive modes of operation. Files passed as command-line arguments can still get vnames from file node entries (done by matching file content), which is necessary to fill in corpus/path/root values.

It's not always the case that a downstream user will easily be able to list the exact files they want to read goals from and/or make those files available to the verifier--consider a test harness that builds an entries file from some target(s) and passes that to the verifier with --use_file_nodes=true. It's simple to say --goal_path_regex='foo/bar/.*', a little less so to enumerate those paths in the harness.

@shahms
Copy link
Contributor

shahms commented Dec 5, 2023

I'm not sure such test harnesses haven't primarily done so out of expedience rather than necessity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verifier Issues with the Kythe verifier
Projects
None yet
Development

No branches or pull requests

2 participants