Frege / frege-native-gen

Frege code generator for Java classes
17 stars 9 forks source link

Appropriate runtime inputs #25

Closed mperry closed 8 years ago

mperry commented 9 years ago

@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.

mperry commented 9 years ago

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

mmhelloworld commented 9 years ago

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 https://github.com/Frege/frege-native-gen/issues/25#issuecomment-146199057 .

mperry commented 9 years ago

No problem. I look forward to the update.

mmhelloworld commented 9 years ago

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

mperry commented 9 years ago

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

mperry commented 9 years ago

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.

mmhelloworld commented 9 years ago

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.

mmhelloworld commented 8 years ago

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.