Refactor: propagate errors in typed_ast#7
Merged
Conversation
schurhammer
reviewed
Feb 25, 2026
Contributor
Author
|
I'm not convinced the fix I pushed will make the tests pass. The tests pass for me locally with or without the fix. Any ideas? |
Owner
The tests failed on compiling gig itself to binary - I assume locally you already had the binary available, so this part didn't run. Try deleting the binary and c file between test runs. Anyway, tests passed :) |
schurhammer
reviewed
Feb 26, 2026
Owner
|
Looks good, I've left some comments about your TODOs edit: github doesn't show the line below the TODO comment.. thats annoying |
Contributor
Author
|
Thanks, all comments addressed. |
Owner
|
Awesome, I will merge now. Thank you 💜 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For issue #6.
This PR replaces most instances of
let assertandpanicwith explicitResult(a, Error)returns. There are two issues of code style that I noticed halfway through and I've adjusted parts of the code I touched to the style I started out with, but let me know if you'd like them changed to the alternative:result.try- this feels more natural/readable to me.result.mapwhen it makes sense. You seem to typically useresult.tryand return an explicitOk(thing)at the end. I see advantages to the latter style, in particular during refactoring and in longer code blocks.