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

More sane error reporting #112

Merged
merged 6 commits into from May 20, 2017
Merged

More sane error reporting #112

merged 6 commits into from May 20, 2017

Conversation

elliotchance
Copy link
Owner

@elliotchance elliotchance commented May 15, 2017

Up until this point most errors result in a panic. This is useful when early stages debugging but it would be extremely painful for anyone trying to properly use the tool if every tiny infringements caused the whole process to stop.

This PR will print errors and warnings as comments at the top of the file, but try to continue sensibly so that it will produce the best Go it can even if that turns out to be not completely correct.

I am testing this on the whole amalgamated SQLite3 source code. Obviously c2go is not at all mature enough to transpire this. However, if i can get it to spit out lots of warnings and at least produce some Go it will be a major step in the right direction.

I have a feeling this PR will turn out to have a great lot of changes so it's likely it will have around for a while, then get it's own release.


This change is Reviewable

@codecov
Copy link

codecov bot commented May 15, 2017

Codecov Report

Merging #112 into master will decrease coverage by 3.85%.
The diff coverage is 40.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
- Coverage   69.11%   65.25%   -3.86%     
==========================================
  Files         120      120              
  Lines        3215     3526     +311     
==========================================
+ Hits         2222     2301      +79     
- Misses        910     1119     +209     
- Partials       83      106      +23
Impacted Files Coverage Δ
program/struct.go 78.57% <0%> (-6.05%) ⬇️
transpiler/operators.go 88.19% <0%> (-2.52%) ⬇️
ast/ast.go 39.32% <15%> (-24.88%) ⬇️
transpiler/transpiler.go 88.12% <33.33%> (-0.63%) ⬇️
util/goast.go 66.66% <33.33%> (+4.16%) ⬆️
transpiler/call.go 79.61% <42.85%> (-14.06%) ⬇️
transpiler/unary.go 67.04% <50%> (-6.2%) ⬇️
transpiler/switch.go 78.49% <50%> (-1.51%) ⬇️
transpiler/branch.go 67.47% <55.55%> (-3.17%) ⬇️
types/resolve.go 73.33% <64.28%> (-10.99%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e77bc64...01ef970. Read the comment docs.

@elliotchance elliotchance changed the title 0.11.x/errors More sane error reporting May 15, 2017
@elliotchance elliotchance modified the milestones: v0.11.x, Future Release May 20, 2017
@elliotchance elliotchance merged commit c838764 into master May 20, 2017
@elliotchance elliotchance deleted the 0.11.x/errors branch May 20, 2017 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant