question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RFC: Introduce build rules for building GWT applications.

See original GitHub issue

I’m looking into adding build rules for building GWT applications. I’m curious what folks think the arguments to the rules should look like.

  • Do we need a special gwt_library() rule, or can we just use java_library()? My intuition is that if you use JSNI in your Java code, then you need to classify that as a gwt_library().
  • How do you deal with dependencies that have dual implementations: one for the JRE and one for JavaScript? For example, you may have a subgraph of dependencies that transitively depend on Guava. Then at the top, you have a gwt_binary() target and a java_binary() target? How do you ensure that the gwt_binary() pulls in guava-gwt-17.0.jar while the java_binary() pulls in guava-17.0.jar? One option is to have parallel versions of each subgraph, but that seems messy.
  • How can we design gwt_binary() (or this whole system of rules) so that it is easy to run the GWT app in developer mode? Ideally, a developer should not have to run buck build after every code modification in order to reload the GWT app. The existing edit-refresh-test cycle needs to be preserved.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:58 (44 by maintainers)

github_iconTop GitHub Comments

1reaction
davidocommented, May 16, 2014

@bolinfest Thanks for adding -Dgwt.normalizeTimestamps=true and changing the output file to .zip.

Are there any other regressions in moving to gwt_binary()?

I have an issue with recovering from compile errors in GWT code:

  • conduct an error in GWT code
  • compile with buck build //gerrit-gwtui:ui_safari, note that output file is not created.
  • revert the error
  • call the target again:
$ buck build //gerrit-gwtui:ui_safari && file `buck targets --show_output //gerrit-gwtui:ui_safari | awk '{print $2}'`
Watchman not found, please install when using buckd.
See https://github.com/facebook/watchman for details.
[-] PARSING BUILD FILES...FINISHED 0,6s
[-] BUILDING...FINISHED 0,3s
Log:
Watchman not found, please install when using buckd.
See https://github.com/facebook/watchman for details.
[-] PARSING BUILD FILES...FINISHED 0,6s
buck-out/gen/gerrit-gwtui/__gwt_binary_ui_safari__/ui_safari.zip: ERROR: cannot open `buck-out/gen/gerrit-gwtui/__gwt_binary_ui_safari__/ui_safari.zip' (No such file or directory)

To recover from this situation, i’ve found that only buck clean helps so far:

$ buck clean 
Watchman not found, please install when using buckd.
See https://github.com/facebook/watchman for details.
davido@linux-ucwl:~/projects/gerrit (upgrade-buck %)$ buck build //gerrit-gwtui:ui_safari && file `buck targets --show_output //gerrit-gwtui:ui_safari | awk '{print $2}'`
Watchman not found, please install when using buckd.
See https://github.com/facebook/watchman for details.
[-] PARSING BUILD FILES...FINISHED 0,6s
[-] BUILDING...FINISHED 1,2s
Watchman not found, please install when using buckd.
See https://github.com/facebook/watchman for details.
[-] PARSING BUILD FILES...FINISHED 0,6s
buck-out/gen/gerrit-gwtui/__gwt_binary_ui_safari__/ui_safari.zip: Zip archive data, at least v1.0 to extract Java Jar file data (zip)

The output file seems not to be created from the cache after GWT error. We are using the following caching strategy:

[cache]
  mode = dir
  dir = buck-out/cache
0reactions
sdwilshcommented, May 18, 2015

We now have integration tests for this provided by @shs96c as well. If someone wanted to submit a pull requests for documentation for these rules, we’d happily take it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RFC 7564 - PRECIS Framework: Preparation, Enforcement ...
1. Width Mapping Rule The width mapping rule of a profile specifies whether width mapping is performed on the characters of a string,...
Read more >
Enforce HTTP RFC compliance | Web App Firewall
Citrix Web App Firewall inspects the incoming traffic for HTTP RFC compliance and drops any request that has RFC violations by default.
Read more >
Building web application security policies with entities - AskF5
When you use, configure, and properly "tune" entities, you help BIG-IP ASM build policies with the right level of security and maintenance ...
Read more >
[GWT] Tutorials - Using GWT RPC
The GWT RPC framework makes it easy for the client and server components of your web application to exchange Java objects over HTTP....
Read more >
An Overview of XMPP
Extensible — using the power of XML, anyone can build custom functionality on top of the core protocols; to maintain interoperability, common extensions...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found