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

Make clap usable, add warnings on missing fact files #129

Merged
merged 1 commit into from
Oct 3, 2019

Conversation

lqd
Copy link
Member

@lqd lqd commented Sep 22, 2019

The ./inputs/clap-rs dataset doesn't work on master, and fails with the rather unhelpful error

ERROR 2019-09-22T00:39:26Z: polonius::cli: `./inputs/clap-rs/app-parser-{{impl}}-add_defaults/`: No such file or directory (os error 2)

even though this directory does exist. The problem is that some of the fact files are missing.

This PR adds a log for when facts files are missing, but still continues execution, defaulting to an empty relation. clap generates these now:

ERROR 2019-09-22T00:42:02Z: polonius::tab_delim: Error opening file './inputs/clap-rs/app-parser-{{impl}}-add_defaults/child.facts': No such file or directory (os error 2). Defaulting to empty relation
ERROR 2019-09-22T00:42:02Z: polonius::tab_delim: Error opening file './inputs/clap-rs/app-parser-{{impl}}-add_defaults/path_belongs_to_var.facts': No such file or directory (os error 2). Defaulting to empty relation
ERROR 2019-09-22T00:42:02Z: polonius::tab_delim: Error opening file './inputs/clap-rs/app-parser-{{impl}}-add_defaults/initialized_at.facts': No such file or directory (os error 2). Defaulting to empty relation
ERROR 2019-09-22T00:42:02Z: polonius::tab_delim: Error opening file './inputs/clap-rs/app-parser-{{impl}}-add_defaults/moved_out_at.facts': No such file or directory (os error 2). Defaulting to empty relation
ERROR 2019-09-22T00:42:02Z: polonius::tab_delim: Error opening file './inputs/clap-rs/app-parser-{{impl}}-add_defaults/path_accessed_at.facts': No such file or directory (os error 2). Defaulting to empty relation

I thought of adding empty files to the dataset to silence the warnings, but leaving them on will remind us to regenerate the clap dataset with these new relations correctly exported.

@nikomatsakis nikomatsakis merged commit 1f31a28 into rust-lang:master Oct 3, 2019
@lqd lqd deleted the fix_clap branch October 3, 2019 12:39
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.

2 participants