-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Rename classes to avoid name clashes #642
Rename classes to avoid name clashes #642
Conversation
Nice! There's one more thing to do: modifying the code generation to use those new names. The relevant code is there: https://github.com/ghostdogpr/caliban/blob/master/tools/src/main/scala/caliban/tools/ClientWriter.scala Let me know if you need more explanations. |
@ghostdogpr Thanks for the review! I will try it tomorrow morning (JST+9:00). |
It is tested (here: https://github.com/ghostdogpr/caliban/blob/master/tools/src/test/scala/caliban/tools/ClientWriterSpec.scala) but the output is a string (generated code), and we just verify that this is the expected code, we don't actually verify that it compiles. That's why the tests passed. If you have a better idea for testing this, feel free to add it 👍 |
Thanks! I got it. |
@@ -8,47 +8,47 @@ import io.circe.{ Decoder, Encoder, Json } | |||
sealed trait Value |
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.
Is it better to rename Value
to __Value
?
I think the type may have the potential to collide with a user type name.
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.
Yeah, I agree.
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.
Perfect! Thanks for the contribution!
This PR solves the issue #543.
#543 (comment)
As suggested by @ghostdogpr, I've changed the internal class names.