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

Write the error output from Protobuf parse exceptions #83

Merged
merged 8 commits into from
Aug 20, 2020

Conversation

dmarticus
Copy link
Contributor

@dmarticus dmarticus commented Aug 13, 2020

Closes #82. Turns out we just needed to override the toString method when using our custom exception.

Old output:

$ muSrcGen
[error] stack trace is suppressed; run last protocol / muSrcGen for the full output
[error] (protocol / muSrcGen) higherkindness.mu.rpc.srcgen.proto.ProtoSrcGenerator$ProtobufSrcGenException
[error] Total time: 1 s, completed Aug 13, 2020, 10:49:20 AM

New output:

$ muSrcGen
[error] stack trace is suppressed; run last protocol / muSrcGen for the full output
[error] (protocol / muSrcGen) Failed to generate Scala source from Protobuf file /Users/dylan/Work/playground/test-protobuf-packages/protocol/target/scala-2.13/resource_managed/main/proto/proto/hello.proto. Error details: Failed to parse package name: <input>:1: error: illegal start of simple expression
[error]
[error] ^
[error] Total time: 1 s, completed Aug 13, 2020, 11:25:16 AM

@dmarticus dmarticus requested a review from cb372 August 18, 2020 20:53
Dylan Martin and others added 3 commits August 20, 2020 08:06
…ts.scala

Co-authored-by: Fede Fernández <720923+fedefernandez@users.noreply.github.com>
…sts.scala

Co-authored-by: Fede Fernández <720923+fedefernandez@users.noreply.github.com>
@dmarticus
Copy link
Contributor Author

@fedefernandez your suggestions have been applied and CI passes, can I merge this PR?

Copy link
Contributor

@fedefernandez fedefernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks

@dmarticus dmarticus merged commit afeeec4 into master Aug 20, 2020
@dmarticus dmarticus deleted the dmarticus/82 branch August 20, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve ProtobufSrcGenExceptions to actually point where the errors are happening
2 participants