-
Notifications
You must be signed in to change notification settings - Fork 89
Bincompat-friendly codegen V1, initialize trait Java codegen plugin #1737
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
Conversation
|
good news, so far this DOES work |
c66e403 to
3fe1aa4
Compare
3fe1aa4 to
04afeb1
Compare
0ff40e5 to
a4c6988
Compare
a4c6988 to
a1d02b4
Compare
| } | ||
| @trait(selector: "structure[trait|smithy4s.meta#bincompatFriendly] > member") | ||
| @traitValidators({ |
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.
I see you've evolved to a higher plane of consciousness
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.
Only level 5 or 6 my dude
| s"Failed to compile ${baseline._1} with Scala $scalaVersion and code:\n$scalaCode" | ||
| ) { | ||
| os.proc( | ||
| "scala-cli", |
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.
sweet baby jeebus !
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.
I wanted a programmatic api for the compiler but there's no common interface for scala 2/3 :(
In any case, we need thiss
| val visitor: Lines = lines( | ||
| block(line"trait Visitor[A]")( | ||
| block({ | ||
| // In bincompat-friendly mode, we can't allow using the raw visitor - only the Default variant is safe to use. |
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.
👍
|
So far I think this is a pretty damn good job ! |
|
enums now work, the tests include a workaround for VirtusLab/scala-cli#3735 |
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 is great work, I'm not gonna nitpick on it (don't even have anything to nitpick on at a glance). Kudos !
|
@lewisjkl , could you do a review as well when time permits ? |
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.
Wow, that was a lot of work! Amazing stuff 🎉
|
work build is happy, feel free to merge on green 👍 if you beat me to it |
Closes #1500
Known TODOs:
PR Checklist (not all items are relevant to all PRs)