-
Notifications
You must be signed in to change notification settings - Fork 349
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
Replace set_last_error with set_last_error_and_return #3941
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert the formatting changes unless they are from ./miri fmt
(you may need to configure your vscode correctly with the settings from CONTRIBUTING.md
)
Also use LibcError("foobar")
everywhere while you're doing this change.
Ignore #3779, i'll rebase at some point |
Not sure why the comments above have all been marked as resolved -- in the PR they are definitely still unresolved. @rustbot author |
Yes, sorry for the wait. How do you want to handle the |
Which comment? |
It's possible that you have an unsubmitted review, then only you can see those comments. They are marked with "pending". There should be a button somewhere to submit the review and make the comments visible to everyone. |
Again sorry about the wait and the careless mistakes, but I added two commits, one a small formatting fix, and in the other I added |
There are unfortunately conflicts with the master branch, could you take care of them with a rebase? |
Of course. All the conflicts are something like this:
I can wrap |
|
a8311c3
to
4c002e3
Compare
I agree, after seeing the new changes while rebasing. @rustbot ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this all looks correct but there is one spot where we can make it a bit more compact. :)
Please also squash the commits (with git rebase --keep-base
).
@rustbot author |
Add `set_last_error_and_return_i64`, change calls from `this.libc_eval` to `LibcError`, and replace pairs of `set_last_error` and returning values of the right type with the new helper functions
4c002e3
to
ca5c26d
Compare
Good catch. Thank you for the close reviews, this should have been much simpler. If I'm still welcome, I'll make sure my next PR goes more smoothly |
Looks good, thanks for the PR!
Sure thing, hickups happen. :) Just be careful and ask us rather than making guesses if you're not sure about something. :D When submitting a PR, it is a very good idea to list which things in the PR you are least sure about -- that greatly helps focus the review effort. |
Replace set_last_error with set_last_error_and_return Took care of the simple patterns. Other patterns involved setting an error and then using `write_int` or setting metadata and returning -1. Unsure if those are in the scope of this change Looks like this has conflicts with #3779, so I can update when how to handle that is decided. Part of #3930.
👀 Test was successful, but fast-forwarding failed: 422 1 review requesting changes by reviewers with write access. |
That's odd... @rust-lang/infra bors has a problem if we leave a "changes required" review, and then the changes are done? CI is green but the PR has not been pushed to master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see if this helps github.
@bors retry |
Replace set_last_error with set_last_error_and_return Took care of the simple patterns. Other patterns involved setting an error and then using `write_int` or setting metadata and returning -1. Unsure if those are in the scope of this change Looks like this has conflicts with #3779, so I can update when how to handle that is decided. Part of #3930.
Wtf, I never saw this error before.. Anyway, what do you think about switching miri from bors to merge queues? xD |
@bors r+ |
💡 This pull request was already approved, no need to approve it again.
|
Yeah someone just needs to put in the work for that and I don't currently have the time.^^ |
Replace set_last_error with set_last_error_and_return Took care of the simple patterns. Other patterns involved setting an error and then using `write_int` or setting metadata and returning -1. Unsure if those are in the scope of this change Looks like this has conflicts with #3779, so I can update when how to handle that is decided. Part of #3930.
☀️ Test successful - checks-actions |
👀 Test was successful, but fast-forwarding failed: 422 1 review requesting changes and 1 approving review by reviewers with write access. |
@oli-obk I think we need to you to send an "approving" review or so, otherwise this PR can't land... Is that really how github reviews work? Nobody else can approve a PR after a team member left a "changes required" review? That's a complete disaster. |
you should be able to dismiss my review in the github ui (i approved it now, but for the future) @bors r+ |
💡 This pull request was already approved, no need to approve it again.
|
Where is the "dismiss review" button? |
Ah I think I found it. That's quite well-hidden... |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request. |
Took care of the simple patterns. Other patterns involved setting an error and then using
write_int
or setting metadata and returning -1. Unsure if those are in the scope of this changeLooks like this has conflicts with #3779, so I can update when how to handle that is decided.
Part of #3930.