percyliang / sempre

Semantic Parser with Execution
Other
828 stars 301 forks source link

Using sempre in a Gradle java project #199

Open stbusch opened 4 years ago

stbusch commented 4 years ago

Hi, I guess for doing so I have to add dependencies to the gradle build file, somehow like this: dependencies { implementation (group: 'com.github.percyliang', name: 'sempre', version: '2.4') } but when trying to build, I get an error message saying sempre couldn't be found. Should I use another version number? Any other idea what is going wrong? jitpack.io repository (for accessing GitHub) is already added.

Thanks for attention, Stefan

ppasupat commented 4 years ago

Hmm.. Looks like v2.4 has not been released. Could you try setting the version to "v2.3" (with "v")?

stbusch commented 4 years ago

Thanks, but I get:

Could not find com.github.percyliang:sempre:v2.3.

I'm trying to apply step 2 from these instructions: https://github.com/jitpack/jitpack.io What else could I try for "version"?

ppasupat commented 4 years ago

Maybe try the master snapshot?

implementation 'com.github.percyliang:sempre:master-SNAPSHOT'
stbusch commented 4 years ago

Also doesn't work

timobaumann commented 4 years ago

hi, the issue might be that jitpack VMs do not have ruby installed. From the error log on jitpack:

/home/jitpack/build/build.xml:18: Execute failed: java.io.IOException: Cannot run program "./scripts/extract-module-classes.rb" (in directory "/home/jitpack/build"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
timobaumann commented 4 years ago

actually, there's no need to run the ruby script just for building, is there? (I guess that should be fixed in the ant-based build-process.)

ppasupat commented 4 years ago

The ant file actually calls scripts/extract-module-classes.rb to generate module-classes.txt, which lists the classes associated with each module. I believe this is used for parsing the command line flags into Options.

timobaumann commented 4 years ago

can the call to ruby be restricted (via ant-logic) to only be run in case that one wants to run sempre (rather than just build the library)?