-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
J2CL Now & Next #93
Comments
Are you planning gradle support ? Bazel is not known to any IDE. |
https://docs.bazel.build/versions/master/ide.html ? |
i would love to see some gRPC support on this list :) |
Are there any workarounds how to run tests, before j2cl_test ll be ported ? It's a critical feature |
any updates here? |
I update it every now and then but comment date doesn't reflect that (you need to click |
Any update on Kotlin support? That would be amazing and java projects are increasingly hybridized with Kotlin |
We just started Kotlin work. Our goal is to have something usable by end of the year. |
@gkdn that is amazing to hear but Kotlin JS is officially developed and has an excellent and mature support for transpiling Kotlin to JS (and generating typescript types) BTW: I concur that Gradle support would be a step in the right direction for adoption. |
Our high demanding customers relies on very Closure style centric Google JavaScript stack (which J2CL is optimized for) and they count every single byte for performance. Unfortunately Kotlin/JS output doesn't match our needs and sometimes in a way that might be contradicting with the Kotlin open-source users needs who rely on different JavaScript stacks. So for now our main focus we will be enabling Kotlin to those customers. Being said that I already met with Roman on this and we are in contact with JetBreains. We will be still looking into bringing the two worlds together in the long run. |
@gkdn I suppose you could apply a post processing step to the generated kotlin-js by feeding it to Closure. You could also work on improving the efficiency of the IR backend. |
@gkdn just in case, do you have any updates about |
We have an intern working on it at the moment but we will see how it will turn out. |
ok, and i suppose you have a deadline right ? |
Should be within 2 months; if the project is successful. |
It looks like it failed ... So pity :( |
Actually basic unit testing support is released, sample app and getting started code is updated accordingly. I haven't closed the task since it still doesn't support test suites but I will update the notes. Edit: updated |
@gkdn Do you plan to add support for the following methods from Java 9-11? And if not, can we make a PR? |
We do accept contributions for missing jre methods. Note that the implementations need to :
Isn't |
I see that Here's the other things I tried, just in case I missed the obvious: $ bazel test //jre/javatests:Lang
ERROR: Skipping '//jre/javatests:Lang': error loading package 'jre/javatests': Label '//javascript/tools/jscompiler/builddefs:flags.bzl' is invalid because 'javascript/tools/jscompiler/builddefs' is not a package; perhaps you meant to put the colon here: '//:javascript/tools/jscompiler/builddefs/flags.bzl'?
ERROR: error loading package 'jre/javatests': Label '//javascript/tools/jscompiler/builddefs:flags.bzl' is invalid because 'javascript/tools/jscompiler/builddefs' is not a package; perhaps you meant to put the colon here: '//:javascript/tools/jscompiler/builddefs/flags.bzl'?
INFO: Elapsed time: 0.207s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
currently loading: jre/javatests Typically when we see
and all of the conformance test wiring that depends on it at least advances us to a new error:
Fortunately this is also not terrible to fix: there are two separate Next, I was getting this error:
It looks like j2cl_test(
name = "Lang",
test_class = "com.google.j2cl.jre.LangSuite",
runtime_deps = [":emul_tests_lib"],
) This hit compile errors, oddly - it seems that At this point, Next, I tried to build (not test) the modified
Is it accurate to say that suites don't work, but a single suite would? Regardless, I changed my custom rule to only run StringTest:
This passed a bazel build finally, but tests fail (specifically
Is there an easier way to go about running tests, so that we can migrate already-working java9-11 stream/optional/collection code into j2cl, complete with tests? Would any/all of this be suitable for a contribution, so that a CI script could exist that runs these emulation tests, in anticipation of emulation patches? |
The JRE unit tests are not ported to open-source so they would not work out of the box. We are currently swamped with couple of a big projects but if you like to commit to the JRE emulation, the best I can offer at the moment is:
If you have further questions, let's start a discussion in the discussions section. |
@gkdn Thanks a million; it works like a charm. |
Great, thank you @gkdn - different changes than I had made, but clearly solving the same issues. I appreciate the pointer to the |
As of 1891f73, you don't need the patch to run JRE tests. |
By popular request, I am listing the things that J2CL team is actively working on apart from continuous improvements and maintenance and what to expect in the next quarters:
Last Edit: Dec 3, 2024
Now
Next
Later
Completed in previous quarters
Note:
The J2CL code is production ready and battle tested with Google Apps for years. Only open-source tooling is missing some workflows. All of our improvements to the released code are in sync with Google and you are getting the improvement at the same time as Google gets.
At the moment for J2CL, we are only planning to do dated releases (instead of semantic versioning like v1) and make more tools work in open source over time.
The text was updated successfully, but these errors were encountered: