cincheo / jsweet-eclipse-plugin

The official Eclipse plugin for the JSweet transpiler
http://www.jsweet.org
Apache License 2.0
20 stars 10 forks source link

No JavaScript generated #12

Closed hohwille closed 7 years ago

hohwille commented 7 years ago

I followed your instructions (http://www.jsweet.org/eclipse-plugin/) and successfully cloned jsweet-quickstart and made it work with maven on command line smoothly. That is already impressive. Also I could install your Eclipse Plugin and SDGB into my Eclipse Neon.1. I could add the JSweet builder and target/js, etc. was already configured properly from the start. I double checked the setting, the builders, etc. and cleaned the project many times, changed the Java source file slightly but in any time I only get output in target/ts and target/js remains empty. I am developing Java for almost 18 years now and am not stupid. It would be great if you have a hint for me what could be wrong.

BTW (you do not seem to have a forum or google group for JSweet so I write this here): I am new to JSweet but have a long GWT history and experience also experimented with dragome, etc. Also I have been through the nodejs, npm, bower, yarn, gulp, grunt, jasmine, karma, phantomJS, typescript, tsd, typings, systemjs, ... hell and I am definitely annoyed by this pain. I read your FAQs, documentation and I am absolutely amazed of what you have created. It looks like exactly the GWT successor that I have been dreaming of. Also I am an enthusiastic OSS developer and provide and contribute to various projects. I would love to write a JS port of my Bean/Properpty support as JSweet Candy (but would need further hints): https://github.com/m-m-m/util/blob/master/bean/src/main/java/net/sf/mmm/util/bean/api/Bean.java https://github.com/m-m-m/util/blob/master/bean/src/test/java/net/sf/mmm/util/bean/impl/BeanFactoryImplTest.java https://github.com/m-m-m/util/blob/master/bean/src/test/java/net/sf/mmm/util/bean/impl/example/ExamplePropertyBean.java Also I wanted to create something really huge as abstraction for JavaFx and GWT that I might want to simplify and reactivate using JSweet: https://github.com/m-m-m/util/wiki/Rescue-the-java-world

In case you want to get in contact mail to hohwille at users.sourceforge.net - Thanks

renaudpawlak commented 7 years ago

Hi there! I did not have a chance to test the JSweet plugin with Neon yet (I am using Mars). So it might just be that the plugin uses an API that was broken in Neon :( I will try to investigate but I don't have much time these days. If you have a chance to try it with Mars, that would be great.

I will email for other topics.

hohwille commented 7 years ago

Thanks for the quick response. I tried with mars but same problem here: Version: Mars.2 Release (4.5.2) Build id: 20160218-0600

I have JSweet Project Builder active in the Builders of the project. I clean the project and refresh target folder. The ts folder got populated but js is entirely empty.

hohwille commented 7 years ago

Is this warning relevant?

candy j4ts:0.2.0-SNAPSHOT was generated for a different version of the transpiler (current:1.2.0, candy:1.1.1)  jsweet-quickstart       Unknown JSweet Problem
hohwille commented 7 years ago

Eclipse Log:

eclipse.buildId=4.6.1.M20160907-1200
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product -keyring C:\Users\hohwille\.eclipse\.keyring -showlocation test
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product -data C:\Projekte\mmm\workspaces\test -keyring C:\Users\hohwille\.eclipse\.keyring -showlocation test

org.jsweet.plugin
Info
Thu Nov 03 21:44:55 CET 2016
forcing favorite static members: org.assertj.core.api.Assertions.*;org.mockito.Matchers.*;org.mockito.Mockito.*;org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestBuilders.*;org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*;org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers.*;org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.*;org.springframework.test.web.client.match.MockRestRequestMatchers.*;org.springframework.test.web.client.response.MockRestResponseCreators.*;org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;org.springframework.test.web.servlet.result.MockMvcResultHandlers.*;org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;org.hamcrest.CoreMatchers.*;org.junit.Assert.*;jsweet.lang.Globals.*;jsweet.util.Globals.*;jsweet.dom.Globals.*;def.jquery.Globals.*;def.underscore.Globals.*

org.jsweet.plugin
Info
Thu Nov 03 21:44:55 CET 2016
compiling [C:\Projekte\mmm\workspaces\test\jsweet-quickstart\src\main\java\quickstart\QuickStart.java]

org.jsweet.plugin
Info
Thu Nov 03 21:44:55 CET 2016
compiling with classpath: C:\Projekte\mmm\workspaces\test\jsweet-quickstart\.jsweet\candies\processed;C:\Projekte\mmm\workspaces\test\jsweet-quickstart\src\test\java;C:\Projekte\mmm\workspaces\test\jsweet-quickstart\src\main\java;C:\Users\hohwille\.m2\repository\org\jsweet\candies\jsweet-core\1.2.0-SNAPSHOT\jsweet-core-1.2.0-SNAPSHOT.jar;C:\Users\hohwille\.m2\repository\org\jsweet\candies\j4ts\0.2.0-SNAPSHOT\j4ts-0.2.0-SNAPSHOT.jar;C:\Users\hohwille\.m2\repository\org\jsweet\candies\sprintf-js\0.0.0-SNAPSHOT\sprintf-js-0.0.0-SNAPSHOT.jar;C:\Users\hohwille\.m2\repository\org\jsweet\candies\jquery\1.10.0-SNAPSHOT\jquery-1.10.0-SNAPSHOT.jar;C:\Projekte\mmm\software\java\jre\lib\resources.jar;C:\Projekte\mmm\software\java\jre\lib\rt.jar;C:\Projekte\mmm\software\java\jre\lib\jsse.jar;C:\Projekte\mmm\software\java\jre\lib\jce.jar;C:\Projekte\mmm\software\java\jre\lib\charsets.jar;C:\Projekte\mmm\software\java\jre\lib\jfr.jar;C:\Projekte\mmm\software\java\jre\lib\ext\access-bridge-64.jar;C:\Projekte\mmm\software\java\jre\lib\ext\cldrdata.jar;C:\Projekte\mmm\software\java\jre\lib\ext\dnsns.jar;C:\Projekte\mmm\software\java\jre\lib\ext\jaccess.jar;C:\Projekte\mmm\software\java\jre\lib\ext\jfxrt.jar;C:\Projekte\mmm\software\java\jre\lib\ext\localedata.jar;C:\Projekte\mmm\software\java\jre\lib\ext\nashorn.jar;C:\Projekte\mmm\software\java\jre\lib\ext\sunec.jar;C:\Projekte\mmm\software\java\jre\lib\ext\sunjce_provider.jar;C:\Projekte\mmm\software\java\jre\lib\ext\sunmscapi.jar;C:\Projekte\mmm\software\java\jre\lib\ext\sunpkcs11.jar;C:\Projekte\mmm\software\java\jre\lib\ext\zipfs.jar;

org.jsweet.plugin
Info
Thu Nov 03 21:44:55 CET 2016
init classpath, jdkHome: C:/Projekte/mmm/software/java/jre

org.jsweet.plugin
Info
Thu Nov 03 21:44:55 CET 2016
include: quickstart/QuickStart.java

org.jsweet.plugin
Info
Thu Nov 03 21:44:55 CET 2016
source dirs: [/jsweet-quickstart/src/test/java, /jsweet-quickstart/src/main/java]

org.jsweet.plugin
Info
Thu Nov 03 21:44:55 CET 2016
JSweet: full build...

org.eclipse.m2e.logback.appender
Warning
Thu Nov 03 21:44:55 CET 2016
Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
renaudpawlak commented 7 years ago

Version mismatch warning in not a crash issue... and I don't see anything relevant in the logs :( I will try it tomorrow and see if I can reproduce the bug. Thanks for your help.

renaudpawlak commented 7 years ago

Ok. It looks like I have the same problem... probably a regression :( I'll tell you when it is fixed.

krishnamoorthya commented 7 years ago

facing the same issue here. please let me know once it is fixed

renaudpawlak commented 7 years ago

Ok. There were many small issues adding up together. Basically, the checkbox to disable JavaScript generation was not working properly. I have fixed this and improved logs and workspace refreshing for better use in the future.

I have redeployed a plugin feature, so just update the plugin through Eclipse and it should work much better. (make sure that the checkbox to disable JavaScript generation is unchecked in your JSweet configuration).

krishnamoorthya commented 7 years ago

it worked. thanks for fixing this so quickly

renaudpawlak commented 7 years ago

@hohwille is it working for you? (you may need to disable the JSweet plugin and to enable it again before cleaning)

hohwille commented 7 years ago

Perfect. :+1: I updated and now it works as expected. Thank you so much for your fast reaction and fixes! Feel free to close this issue.

JordanLongstaff commented 4 years ago

I'm having the same problem. I'm using Eclipse 2019-12 and the latest version of the plugin.

lgrignon commented 4 years ago

Hello @JordanLongstaff I think your problem may be different and would require a new ticket.

Are you using JDK 8? JSweet Eclipse plugin uses JSweet 2.x which only supports Java 8.

JordanLongstaff commented 4 years ago

I wasn't, but I changed my project to JDK 8u241 and it still doesn't work.

JordanLongstaff commented 4 years ago

OK...first of all, one of the forks of this project actually told me that I have to run Eclipse using the JDK and not the JRE or else JSweet won't work at all (because of some BS with Maven requiring that -.-). So now, finally, JSweet can successfully generate the TypeScript files, but not JS.