-
Notifications
You must be signed in to change notification settings - Fork 33
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
Issue #109 | Improving errors #184
Conversation
A new error type has been created for the binary part of the tool, and the project should compile and work. It works with printing out the errors, and works just like any good old Rust error. There is however one weak point, and that is debugging is hard with this method. This should be solved before this is merged into main.
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.
Hmm. It's quite nice. Good job! I'm in the middle of some unrelated work. So I'd like to come back and play with it. But so far this is looking great!
A couple quick changes I spotted can be resolved though.
Co-authored-by: Chris Pryer <[email protected]>
Cheers. I'll go through all of the requests tomorrow when I'm done with school. |
Take your time :) I tried running it but couldn't. Looks like the ci-rust action is failing. Just a heads up. |
Thats odd. It runs fine for me. I'll have a look at that |
I just |
Oh the CI fails cus some tests fail. Mentioned that in the original post. I'll be fixing those tmr |
Co-authored-by: Chris Pryer <[email protected]>
I got errands today but I'll do some work tonight. If you go back to original post, what do you think about improving these errors with more debug information? |
No prob. I appreciate the communication. I'd say let's try to implement this in pieces. We can keep PRs smaller. So a follow up one can add debug info. This one we should just improve on the current error handling. I like what you have here, I just want us to clarify how we'll handle the logic I called out in my most recent comment. So
this I like. I just think we need something for when it's an error code/info from a process we're wrapping (like ruff's).
this I also like. but we should approach it in pieces. |
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.
This comment specifically
Thanks, I'll have a look at it. |
I'm looking at the error and its giving me "No such file or directory (os error 2)" errors. I have no clue what this means, but I'll be digging through whats failing. |
and the option for Ruff, PyBlack and PyTest errors can be done. Fixed .gitignore too.
Co-authored-by: Chris Pryer <[email protected]>
Okay, it compiles and works now, and I (think) have implemented what you wanted changed. The only problem is the tests, which I don't even know my changes to the error type makes it fail, considering its an OS error? |
I see |
I think I need to fix my IDE's pushing then, it should do cargo fmt before my commit but apparently not. Tests still fail. |
If you're talking about |
More info on the checks at the bottom of this section. |
Yeah, was just me misunderstanding what "Reformat code" did in IntelliJ, but I'll remember to fmt now. The linter is not happy, but I don't know how to run that locally. |
However, after fixing what the linter complains about, the main problem is just tests. I still do not know what makes them fail, but the errors I get is this
This happens on:
|
heh. A great reason to welcome PRs like these 😅 |
I can try to help out in a bit if you need it. when we have better errors we'll have less trouble debugging something like this. |
Debugging help would be nice. I do not know how it doesn't fail on the current main branch, so SOMETHING has changed between current main and my dev branch. I'll be trying to fix this now. |
Could it be the tests themselves are faulty? It's erroring on the fact that there are no files, which doesn't have anything to do with my contribution. The only things I have changed myself is how errors are handled. Very weird error. |
For sure. This entire project was started this month lol. I should be able to help out soon. |
I've digged through the edited files and I see nothing that could change the behavior of functions. ¯\_(ツ)_/¯ |
What OS are you on? |
I'm running Pop!_OS 22.04. |
with
|
Not before opening the PR |
Do you have the alias for |
I don't use aliases, so I'm not sure what you mean by this. |
Pushed this so the linter is happy. If the tests fail there, then idk |
If you use discord it might help to chat more there https://discord.gg/St3menxFZT |
Tag #109
Alright, so this is the work I've done so far. It's not in a complete stage yet, and some more work needs to be done. I think I could finish whatever changes are needed tomorrow, but a solution needs to be found for one stark problem, and that it can be very hard to know exactly where and what broke when these happen, and I think we can fix that by:
Sidenote: I'm glad this project is using MIT. Maybe we can add a file called CONTRIBUTORS adding everyone's individual copyright license, but I digress, it's not important for me.
Also, the majority of files were edited, but the majority is just converting the new function. The majority of changes happened in main.rs and errors.rs.
There are failing tests but that can be fixed at the end, I'm guessing the majority of them is just not made for the new kinds of errors.