Frege / frege-gradle-plugin

Gradle plugin for compiling Frege projects
BSD 3-Clause "New" or "Revised" License
25 stars 10 forks source link

Resulting jar contains intermediate java code generated by the frege compiler #34

Closed alaendle closed 8 years ago

alaendle commented 8 years ago

Is this necessary? Or could/should java sources not be included?

Workaround - add this to your gradle file: jar { exclude('**/*.java') }

Dierk commented 8 years ago

well, I'm kind of undecided on that one. What are pro's and con's for including the generated java files?

Ingo60 commented 8 years ago

Con : disk space usage. Pro: you can make a minimal stand - alone Jar from that (provided you do have the java artifacts of the standard library and other dependencies)

Dierk commented 8 years ago

For the gradle plugin we also have to consider that it will (I'm tempted to add "typically") be used together with Java code and then we may interfere with the jarring of .java source files...

Ingo60 commented 8 years ago

I advise not to act on this issue before the next release is out. The compiler will then have an option to remove the java files.

mmhelloworld commented 8 years ago

Another advantage for retaining Java sources is to be able to debug in IDEs. I have debugged successfully in IntelliJ and I find it often very useful.

alaendle commented 8 years ago

O.k. - interesting discussion of pro/con. Thanks for you comments! From a frege beginners point of view it seems to be just redundant to have java sources and resulting il-code in one distributable. But I can understand that it might be valuable during debugging. Since it is very easy to exclude generated java code - and there are scenarios where it might be better to have the sources included - I'm fine if this issue gets closed - or keep it open with very low priority.

Dierk commented 8 years ago

This issue will become obsolete as soon as the compiler allows removal of the .java files and we expose this option in the compileFrege task.