-
Notifications
You must be signed in to change notification settings - Fork 8
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
Refactor results into common CompilationResult hierarchy #136
Conversation
This creates a new sealed `CompilationResult` hierarchy that includes subtypes for JS and JVM results. This should be a mostly source-compatible (but not binary compatible) change. One important source compatibility change is that now JS files output is just called `jsFiles` rather than the borrowed JVM "classesAndResources" name from before.
@JakeWharton would be curious for your thoughts on this! |
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.
Nice!
@@ -0,0 +1,67 @@ | |||
package com.facebook.buck.jvm.java.javax.com.tschuchort.compiletesting |
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.
Uhhhhh
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.
oh my
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.
|
||
/** Result of the compilation. */ | ||
@ExperimentalCompilerApi | ||
sealed class CompilationResult( |
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.
Could be interface
. Don't think you gain anything by using a class here except maybe the future pain of the rigidity of inheritance.
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 creates a new sealed
CompilationResult
hierarchy that includes subtypes for JS and JVM results. This should be a mostly source-compatible (but not binary compatible) change.One important source compatibility change is that now JS files output is just called
jsFiles
rather than the borrowed JVM "classesAndResources" name from before.Resolves #129