Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upIssue #1029: Print error messages if header is a folder or unreadable #1092
Conversation
highfive
assigned
fitzgen
Oct 23, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @fitzgen (or someone else) soon. |
highfive
added
the
S-awaiting-review
label
Oct 23, 2017
pepyakin
reviewed
Oct 23, 2017
| return Err(()); | ||
| } | ||
| if !can_read(&md.permissions()) { | ||
| eprintln!("error: insufficiant permissions to read '{}'", h); |
This comment has been minimized.
This comment has been minimized.
| #[cfg(unix)] | ||
| fn can_read(perms: &std::fs::Permissions) -> bool { | ||
| use std::os::unix::fs::PermissionsExt; | ||
| perms.mode() & 0o400 > 0 |
This comment has been minimized.
This comment has been minimized.
pepyakin
Oct 23, 2017
Contributor
I'm not sure if this check is reliable enough...
The check assumes that bindgen is running under the user who owns this file which may not be the case.
This comment has been minimized.
This comment has been minimized.
fitzgen
approved these changes
Oct 23, 2017
|
LGTM, just need s/ |
| #[cfg(unix)] | ||
| fn can_read(perms: &std::fs::Permissions) -> bool { | ||
| use std::os::unix::fs::PermissionsExt; | ||
| perms.mode() & 0o400 > 0 |
This comment has been minimized.
This comment has been minimized.
seemyvest
force-pushed the
seemyvest:fix-1029
branch
from
bc0e042
to
33a0764
Oct 23, 2017
This comment has been minimized.
This comment has been minimized.
|
@bors-servo r=fitzgen Thanks for working on this! |
This comment has been minimized.
This comment has been minimized.
|
|
highfive
added
S-awaiting-merge
and removed
S-awaiting-review
labels
Oct 24, 2017
This comment has been minimized.
This comment has been minimized.
bors-servo
added a commit
that referenced
this pull request
Oct 24, 2017
This comment has been minimized.
This comment has been minimized.
|
|
bors-servo
merged commit 33a0764
into
rust-lang:master
Oct 24, 2017
highfive
removed
the
S-awaiting-merge
label
Oct 24, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks @seemyvest ! Interested in finding another issue to hack on? I can help find something if nothign from the issue tracker jumps out at you :) |
fitzgen
referenced this pull request
Oct 31, 2017
Closed
Should have better error messages when input files aren't files #1029
This comment has been minimized.
This comment has been minimized.
durka
commented
Nov 7, 2017
|
Since this PR, bindgen panics with no explanation if the header does not exist. Consider not unwrapping the result of |
This comment has been minimized.
This comment has been minimized.
|
Woops, I should have caught that in review! Are you interested in making a PR that fixes this @durka ? Or maybe @seemyvest ? |
This comment has been minimized.
This comment has been minimized.
|
No problem |
seemyvest commentedOct 23, 2017
r? @fitzgen