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
Scala cmdl compiler #30
Conversation
def main(args: Array[String]): Unit = { | ||
val compiler = new OnTheFlyCompiler(None) | ||
val clazz = compiler | ||
.tryToCompileClass("/Users/jochen/Development/8_vertx/vertx-lang-scala/vertx-lang-scala-on-the-fly/src/test/resources/SourceClass.scala") |
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.
isn't that a problem ?
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.
Holy cow, overlooked that one.
PR ftw :)
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.
Luckily that was a class I only used for my first test. I deleted it.
Looks good to me. Only one minor comment, when reading the class name: className.split(System.getProperty("file.separator")).last.replace(".scala","") Wouldn't it be safer to do this with Java's Also, it might not be a problem in Scala but what happens if the verticle is in a package? The test case is for a verticle placed in the root of the classpath. |
Thanks for pointing that out. I will take a closer look at how the other langs handle that case. |
Thanks for the recommendation. I switched to using Paths and added the capability to build Scala-Files from the classpath. |
👍 |
Scala cmdl compiler
Resolves #11