Skip to content
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

Open
smarter opened this issue Dec 22, 2016 · 3 comments
Open

Support for compiling custom files? #4

smarter opened this issue Dec 22, 2016 · 3 comments

Comments

@smarter
Copy link
Contributor

smarter commented Dec 22, 2016

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?

@gkossakowski
Copy link
Owner

gkossakowski commented Dec 23, 2016

The arguments passed to run are passed as an array of strings that the main method takes:

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.

@smarter
Copy link
Contributor Author

smarter commented Dec 23, 2016

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

@gkossakowski
Copy link
Owner

gkossakowski commented Dec 23, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants