-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support for compiling custom files? #4
Comments
The arguments passed to object Main {
def main(args: Arra[String]): Unit = args(0) == "foo.scala" //this would yield true
} I like the idea of unhardcoding scalap. Maybe, it could be done that if no arguments are passed, you get scalap processed, otherwise the source that was passed as an argument. |
I know how main methods work, I was more wondering about what would need to be adapted in the code :). In particular I see that you're doing a bunch of preprocessing specific to scalap in https://github.com/gkossakowski/kentuckymule/blob/master/kentuckymule/src/main/scala/kentuckymule/ScalapHelper.scala |
Ah, I misunderstood. Yes, I populate the symbol table with stub symbols
that are not defined in scalap sources but are referenced from there. Those
symbols corresponding to Java and Scala standard libraries.
It is my way of getting scalap typechecking to work without spending time
on writing a (fast) class file parser that would parse jars corresponding
to Java and Scala libraries.
If you want to support just self-contained sources (that do not rely on
Scala/Java std libs too much), then you can keep the call to ScalapHelper
around just for the basic types like Int, or Array.
…On 23 December 2016 at 14:50, Guillaume Martres ***@***.***> wrote:
I know how main methods work, I was more wondering about what would need
to be adapted in the code :). In particular I see that you're doing a bunch
of preprocessing specific to scalap in https://github.com/
gkossakowski/kentuckymule/blob/master/kentuckymule/src/
main/scala/kentuckymule/ScalapHelper.scala
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAQeWzBCXJnGM6Z90UZ54vom2qT2Zp0ks5rLFBNgaJpZM4LUWh5>
.
--
gkk
|
As far as I can see, everything is hardcoded to compile scalap, what would be needed to be able to do:
> run foo.scala
from sbt, and have it just work?
The text was updated successfully, but these errors were encountered: