rascal icon indicating copy to clipboard operation
rascal copied to clipboard

add `compile` function to the JDT interface

Open jurgenvinju opened this issue 4 years ago • 0 comments

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

  • call mvn from the commandline interface, or
  • call javac from the commandline interface

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

  • this functionality might come in very handy when building a REPL for the Rascal compiler.

jurgenvinju avatar Apr 07 '21 13:04 jurgenvinju