usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
408 stars 77 forks source link

add `compile` function to the JDT interface #1494

Open jurgenvinju opened 3 years ago

jurgenvinju commented 3 years ago

Is your feature request related to a problem? Please describe.

It's low hanging fruit, but the current Rascal/Eclipse JDT bridge does not support the compilation of java files to .class files, called from Rascal.

Describe the solution you'd like

I'd like to have a function called compile with list[loc] srcs and list[loc] classpath and loc bin as parameters that will use the JDT's Java compiler to compile the source files in srcs to .class files.

By doing this we would provide a closed abstraction for the loc data-type to be passed into the JDT compiler. So source files can come from any logical or physical resource schema.

Describe alternatives you've considered

but these do not support the abstraction offered by the loc data-type, and such support would duplicate the current interface we have to the JDT's compiler.

Additional context

jurgenvinju commented 2 weeks ago

Better do this with the jdk compiler so we can use it for the rascal compiler as well.