Frege/frege-native-gen

Appropriate runtime inputs

Closed this issue · 8 comments

@mmhelloworld
It is not clear to me how to run the native gen now for a simple example.

I couldn't get it to work since the changes to generate all classes in a package recursively. An example might be best.

I run it from gradle using 'gradlew run --console=plain'. What are appropriate values for the package and output dir to see some output? I tried the pair 'java.util.HashSet' and '.' with several other values for the output directory, but didn't see any output.

Hi @mmhelloworld, just thought I would ping you again to remind you about this issue.

Hey, I am really sorry that I couldn't get back to you earlier. I will
hopefully get some time today to update the documentation on how to run
this with new changes.
On Wed, Oct 7, 2015 at 9:40 AM Mark Perry notifications@github.com wrote:

Hi @mmhelloworld https://github.com/mmhelloworld, just thought I would
ping you again to remind you about this issue.


Reply to this email directly or view it on GitHub
#25 (comment)
.

No problem. I look forward to the update.

I have pushed my changes and updated README on how to run the application. It now supports generating Frege modules for an entire Java package and all its sub packages so the input is just the package name and it also generates import statements based on the dependencies.

For example, the following is to create Frege modules for all the classes under java.util package:
java -cp "lib/*:$JAVA_HOME/jre/lib/*" frege.nativegen.Main java.util

I'll have a look at this in the next few days.

I tried this after creating closing issues #26 and #27. Using the argument 'fj' for the FunctionalJava package produces code under generated-sources, but using "java.util.HashSet" or "java.util" produces no code under the generated-sources directory.

The command I was using was gradlew run and the argument is taken from line 43 from build.gradle.

I have commented on your commits regarding fj. For any classes in JDK, we need to add rt.jar in the classpath otherwise guava doesn't seem to work. It is described in the README.

I am closing this issue now. As described in my previous comment, please try updating the classpath. If it doesn't work, please reopen the issue.