Giter Site home page Giter Site logo

rules_gwt's People

Contributors

auke- avatar buchgr avatar damienmg avatar dkelmer avatar dslomov avatar ekuefler avatar kchodorow avatar laurentlb avatar lupino3 avatar meteorcloudy avatar philwo avatar vladmos avatar wyverald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rules_gwt's Issues

Windows support?

ERROR: D:/github/pavi2410/appinventor/appinventor/appengine/BUILD.bazel:14:16: GWT compiling appinventor/appengine/GwtApp.war failed: (Exit 127): bash.exe failed: error executing command (from target //appinventor/appengine:GwtApp) C:\WINDOWS\system32\bash.exe -c ... (remaining 1 argument skipped)
/bin/bash: line 2: external/local_jdk/bin/java: No such file or directory

Dev mode does not detect changes in the generated code

When I'm using dev mode with an annotation processor (dagger). The dev mode does not detect changes in the generated code, only detects the changes in my code. I have to restart dev mode every time and that's not very productive.

$ bazel info
bazel-bin: /private/var/tmp/_bazel_fsousa/187058d15007c884f8885295a818c294/execroot/monorepo/bazel-out/darwin-fastbuild/bin
bazel-genfiles: /private/var/tmp/_bazel_fsousa/187058d15007c884f8885295a818c294/execroot/monorepo/bazel-out/darwin-fastbuild/bin
bazel-testlogs: /private/var/tmp/_bazel_fsousa/187058d15007c884f8885295a818c294/execroot/monorepo/bazel-out/darwin-fastbuild/testlogs
character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1
command_log: /private/var/tmp/_bazel_fsousa/187058d15007c884f8885295a818c294/command.log
committed-heap-size: 457MB
execution_root: /private/var/tmp/_bazel_fsousa/187058d15007c884f8885295a818c294/execroot/monorepo
gc-count: 88
gc-time: 6017ms
install_base: /var/tmp/_bazel_fsousa/install/7d5da6db2b770633e7923fd0e464983d
java-home: /private/var/tmp/_bazel_fsousa/install/7d5da6db2b770633e7923fd0e464983d/_embedded_binaries/embedded_tools/jdk
java-runtime: OpenJDK Runtime Environment (build 11.0.2+7-LTS) by Azul Systems, Inc.
java-vm: OpenJDK 64-Bit Server VM (build 11.0.2+7-LTS, mixed mode) by Azul Systems, Inc.
max-heap-size: 3817MB
output_base: /private/var/tmp/_bazel_fsousa/187058d15007c884f8885295a818c294
output_path: /private/var/tmp/_bazel_fsousa/187058d15007c884f8885295a818c294/execroot/monorepo/bazel-out
package_path: %workspace%
release: release 0.27.0
repository_cache: /var/tmp/_bazel_fsousa/cache/repos/v1
server_log: /private/var/tmp/_bazel_fsousa/187058d15007c884f8885295a818c294/java.log.nostradamus.fsousa.log.java.20190620-143343.15144
server_pid: 15144
used-heap-size: 236MB
workspace: /Users/fsousa/Projects/ipb/monorepo

Flag --incompatible_restrict_string_escapes will break rules_gwt in Bazel 1.2.1

Incompatible flag --incompatible_restrict_string_escapes will break rules_gwt once Bazel 1.2.1 is released.

Please see the following CI builds for more information:

Questions? Please file an issue in https://github.com/bazelbuild/continuous-integration

Important: Please do NOT modify the issue title since that might break our tools.

Failed to build on Ubuntu 18.04 with JDK 11

https://buildkite.com/bazel/rules-gwt/builds/75#63496e61-792d-420f-b036-2d73dea73ec2

ERROR: /workdir/example/src/main/java/io/bazel/sample/BUILD:7:1: Couldn't build file example/src/main/java/io/bazel/sample/SampleApp.war: error executing shell command: '/bin/bash -c set -e
--
  | external/local_jdk/bin/java -Xmx1G -cp bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp-deps_deploy.jar:bazel-out/k8-fastbuild/bin/example/src/main/jav...' failed (Exit 1) bash failed: error executing command
  | (cd /home/bazel/.cache/bazel/_bazel_bazel/ec321eb2cc2d0f8f91b676b6d4c66c29/sandbox/linux-sandbox/36/execroot/io_bazel_rules_gwt && \
  | exec env - \
  | /bin/bash -c 'set -e
  | external/local_jdk/bin/java -Xmx1G -cp bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp-deps_deploy.jar:bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp-deps_deploy-src.jar com.google.gwt.dev.Compiler -war bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output/. -deploy bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output/WEB-INF/deploy -extra bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.extra -strict -sourceLevel 1.8 io.bazel.sample.SampleApp
  | cp -LR example/src/main/java/io/bazel/sample/public/WEB-INF example/src/main/java/io/bazel/sample/public/css example/src/main/java/io/bazel/sample/public/index.html bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output
  | rm -rf bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output/gwt-unitCache
  | find bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output -type f \| sed '\''s:^bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output/::'\'' > file_list
  | root=`pwd`
  | cd bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output; $root/external/bazel_tools/tools/zip/zipper/zipper Cc ../SampleApp.war @$root/file_list
  | cd $root
  | ')
  | Execution platform: @bazel_tools//platforms:host_platform
  |  
  | Use --sandbox_debug to see verbose messages from the sandbox: bash failed: error executing command
  | (cd /home/bazel/.cache/bazel/_bazel_bazel/ec321eb2cc2d0f8f91b676b6d4c66c29/sandbox/linux-sandbox/36/execroot/io_bazel_rules_gwt && \
  | exec env - \
  | /bin/bash -c 'set -e
  | external/local_jdk/bin/java -Xmx1G -cp bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp-deps_deploy.jar:bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp-deps_deploy-src.jar com.google.gwt.dev.Compiler -war bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output/. -deploy bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output/WEB-INF/deploy -extra bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.extra -strict -sourceLevel 1.8 io.bazel.sample.SampleApp
  | cp -LR example/src/main/java/io/bazel/sample/public/WEB-INF example/src/main/java/io/bazel/sample/public/css example/src/main/java/io/bazel/sample/public/index.html bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output
  | rm -rf bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output/gwt-unitCache
  | find bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output -type f \| sed '\''s:^bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output/::'\'' > file_list
  | root=`pwd`
  | cd bazel-out/k8-fastbuild/bin/example/src/main/java/io/bazel/sample/SampleApp.war.gwt_output; $root/external/bazel_tools/tools/zip/zipper/zipper Cc ../SampleApp.war @$root/file_list
  | cd $root
  | ')
  | Execution platform: @bazel_tools//platforms:host_platform
  |  
  | Use --sandbox_debug to see verbose messages from the sandbox
  | May 07, 2019 9:50:24 AM java.util.prefs.FileSystemPreferences$1 run
  | WARNING: Couldn't create user preferences directory. User preferences are unusable.
  | May 07, 2019 9:50:24 AM java.util.prefs.FileSystemPreferences$1 run
  | WARNING: java.io.IOException: No such file or directory
  | Compiling module io.bazel.sample.SampleApp
  | [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
  | INFO: Elapsed time: 17.948s, Critical Path: 4.84s
  | INFO: 37 processes: 37 remote cache hit.
  | FAILED: Build did NOT complete successfully


/cc @philwo @ekuefler

Flag --incompatible_no_implicit_file_export will break rules_gwt in a future Bazel release

Incompatible flag --incompatible_no_implicit_file_export will be enabled by default in a future Bazel release [1], thus breaking rules_gwt.

The flag is documented here: bazelbuild/bazel#10225

Please check the following CI builds for build and test results:

Never heard of incompatible flags before? We have documentation that explains everything.

If you don't want to receive any future issues for rules_gwt or if you have any questions,
please file an issue in https://github.com/bazelbuild/continuous-integration

Important: Please do NOT modify the issue title since that might break our tools.

[1] The target release hasn't been determined yet. Our tool will update the issue title once the flag flip has been scheduled.

Bazel --incompatible_depset_is_not_iterable

From the latest CI run (https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/28#93a20a9b-87b7-409a-9267-738b57fd1eba), this repository doesn't work with --incompatible_depset_is_not_iterable.

Logs:

ERROR: /var/lib/buildkite-agent/builds/bk-docker-gjds/bazel-downstream-projects/rules_gwt/example/src/main/java/io/bazel/sample/BUILD:7:1: in _gwt_war rule //example/src/main/java/io/bazel/sample:SampleApp:
--
  | Traceback (most recent call last):
  | File "/var/lib/buildkite-agent/builds/bk-docker-gjds/bazel-downstream-projects/rules_gwt/example/src/main/java/io/bazel/sample/BUILD", line 7
  | _gwt_war(name = 'SampleApp')
  | File "/var/lib/buildkite-agent/builds/bk-docker-gjds/bazel-downstream-projects/rules_gwt/gwt/gwt.bzl", line 22, in _gwt_war_impl
  | ":".join([dep.path for dep in all_deps])
  | File "/var/lib/buildkite-agent/builds/bk-docker-gjds/bazel-downstream-projects/rules_gwt/gwt/gwt.bzl", line 22, in ":".join
  | [dep.path for dep in all_deps]
  | type 'depset' is not iterable. Use the `to_list()` method to get a list. Use --incompatible_depset_is_not_iterable=false to temporarily disable this check.

Documentation: https://docs.bazel.build/versions/master/skylark/depsets.html
Let me know if you need help

Cannot build `//...` with Bazel 2.0.0

At bb9d9f7, build broken on Bazel CI:
https://buildkite.com/bazel/rules-gwt/builds/290#1226e35c-3b8e-4eb3-92e5-0946061bca53

I can also repro locally:

bazel build --nobuild //...

(...)
INFO: Call stack for the definition of repository 'remote_java_tools_linux' which is a http_archive (rule definition at /usr/local/google/home/laszlocsomor/.cache/bazel/_bazel_laszlocsomor/a48b2a55f93b882b584aa1279610c783/external/bazel_tools/tools/build_defs/repo/http.bzl:292:16):
 - /usr/local/google/home/laszlocsomor/.cache/bazel/_bazel_laszlocsomor/a48b2a55f93b882b584aa1279610c783/external/bazel_tools/tools/build_defs/repo/utils.bzl:205:9
 - /DEFAULT.WORKSPACE.SUFFIX:260:1
ERROR: /usr/local/google/home/laszlocsomor/stuff/rules_gwt/gwt/gwt.bzl:515:5: //external:gwt_gson depends on @gwt_gson_artifact//jar:jar in repository @gwt_gson_artifact which failed to fetch. no such package '@gwt_gson_artifact//jar': java.io.IOException: Error downloading [http://central.maven.org/maven2/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar] to /usr/local/google/home/laszlocsomor/.cache/bazel/_bazel_laszlocsomor/a48b2a55f93b882b584aa1279610c783/external/gwt_gson_artifact/gson-2.6.2.jar: GET returned 501 HTTPS Required

Other Bazel CI projects also broke with similar errors. Culprit is, Maven repository no longer supports "http" fetches. Example fix in another repo: bazelbuild/codelabs#30

gwt.bzl inconsistent between repository and tar.gz on Releases page

Following the instructions in README.md, I'm noticing that my sample application results in the following error:

ERROR: OMITTED/io_bazel_rules_gwt/gwt/gwt.bzl:66:41: name 'FileType' is not defined

Looking at the tarball currently specified in Setup, I see that gwt.bzl does include an undefined name FileType on line 66 and 144.

_gwt_dev = rule(
  implementation = _gwt_dev_impl,
  attrs = {
    "package_name": attr.string(mandatory=True),
    "java_roots": attr.string_list(mandatory=True),
    "deps": attr.label_list(mandatory=True, allow_files=FileType([".jar"])),
    "modules": attr.string_list(mandatory=True),
    "pubs": attr.label_list(allow_files=True),
    "output_root": attr.string(default="."),
    "dev_flags": attr.string_list(),
    "jvm_flags": attr.string_list(),
  },
  executable = True,
)

It seems these were removed in the current version of gwt.bzl, but it is still used in the README.md and will result in a similar error message.

Stakeholder Reach-out: Is this project maintained?

The last meaningful commits here, along with the last release, were 2 1/2 years ago by @ekuefler.

If no one maintains this, I think we should either start a discussion to find new maintainers, or archive the repository to clearly set community expectations.

If you use these rules and see this message, it would be great to comment that you depend on them.

Flag --incompatible_load_java_rules_from_bzl will break rules_gwt in Bazel 1.2.1

Incompatible flag --incompatible_load_java_rules_from_bzl will break rules_gwt once Bazel 1.2.1 is released.

Please see the following CI builds for more information:

Questions? Please file an issue in https://github.com/bazelbuild/continuous-integration

Important: Please do NOT modify the issue title since that might break our tools.

How to include web.xml?

Hi,
I was wondering how the sample app could be modified to include a "web.xml" that is often found in WEB-INF?

Error on build

I have the following error:

ERROR: /private/var/tmp/_bazel_kostik/4c8c2bd228bf93b7790b6dc4f1bd0724/external/io_bazel_rules_gwt/gwt/gwt.bzl:436:3: no such package '@gwt_user_artifact//jar': BUILD file not found on package path and referenced by '//external:gwt-user'

What can I do about it?

Exception on running super dev mode

java.lang.NoClassDefFoundError: com/google/gson/JsonParseException
at com.google.gwt.thirdparty.debugging.sourcemap.SourceMapGeneratorV3.mergeMapSection(SourceMapGeneratorV3.java:310)
at com.google.gwt.core.linker.SymbolMapsLinker.link(SymbolMapsLinker.java:316)
at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLinkForOnePermutation(StandardLinkerContext.java:384)
at com.google.gwt.dev.Link.finishPermutation(Link.java:483)
at com.google.gwt.dev.Link.doSimulatedShardingLink(Link.java:445)
at com.google.gwt.dev.Link.link(Link.java:178)
at com.google.gwt.dev.Compiler.compile(Compiler.java:244)
at com.google.gwt.dev.codeserver.Recompiler.doCompile(Recompiler.java:362)
at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:175)
at com.google.gwt.dev.codeserver.Recompiler.recompile(Recompiler.java:134)
at com.google.gwt.dev.codeserver.Outbox.recompile(Outbox.java:135)
at com.google.gwt.dev.codeserver.JobRunner.recompile(JobRunner.java:113)
at com.google.gwt.dev.codeserver.JobRunner.access$000(JobRunner.java:37)
at com.google.gwt.dev.codeserver.JobRunner$2.run(JobRunner.java:90)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.google.gson.JsonParseException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 19 more

Flag --incompatible_no_implicit_file_export will break rules_gwt in Bazel 1.2.1

Incompatible flag --incompatible_no_implicit_file_export will break rules_gwt once Bazel 1.2.1 is released.

Please see the following CI builds for more information:

Questions? Please file an issue in https://github.com/bazelbuild/continuous-integration

Important: Please do NOT modify the issue title since that might break our tools.

Please move from native to Skylark rules for external git/http repositories

Bazel is planning to move away from native rules for external repositories to Skylark rules, mainly because bundling every version control system in bazel does not scale. As part of this effort, we plan to submit https://bazel-review.googlesource.com/c/bazel/+/55932 soon, which will cause bazel by default to insist that the skylark versions the git and http rules for external repositories be used. This can be disabled by a flag for at least the next 6 months, but we still would appreciate if you could adopt your repository to use the Skylark versions of those rules soon.

A test run of downstream projects with that flag flip in bazel enabled can be found at https://buildkite.com/bazel/bazel-with-downstream-projects-bazel/builds/286

For more background, see

Thanks.

java_import_external

@ekuefler, you may recall bazelbuild/bazel#1952 where we had a discussion about best practices for defining Maven dependencies.

With your approval, I would like to volunteer my time to migrate this project to what seems to be the emerging consensus. That would entail modifying gwt/gwt.bzl to use java_import_external.

List of Converted Projects

Benefits of Migration

  1. Faster downloads, redundant URLs, connection retries, exponential backoff, connection reset recovery, fast failover, auto-avoidance of low-bandwidth mirrors, captive portal avoidance, and compliance with policies of certain great firewalls. See: bazelbuild/bazel@ed7ced0

  2. Shorter names. You can say deps = ["@com_google_guava"] instead of deps = ["@com_google_guava//jar"].

  3. Dependency relationships are encoded into repositories. If you want //external:gwt_jetty you currently need to depend on //external:gwt_jetty AND //external:gwt_jetty-io AND //external:gwt_jetty-util because maven_jar didn't let you specify that jetty depended on those jars. With java_import_external, if you want jetty, you just depend on jetty.

  4. Ability to set testonly = 1 which maven_jar doesn't do.

  5. Ability to set licenses = ["notice"], etc. which maven_jar doesn't do.

  6. Ability to define annotation processors. See Dagger example here.

If you find the technical merits of these developments compelling, let me know, and I'll move forward.

Side note: I have another cool repository rule I've developed called filegroup_external (source) which you may also find interesting. I'd love to hear your thoughts.

Dev mode doesn't work

When I change a file, nothing gets recompiled. It seems that you use built jars which never change.

rules_gwt broken by bazel@HEAD

Hello dear rules owners,

I see that bazel@HEAD breaks rules_gwt: https://buildkite.com/bazel/bazel-with-downstream-projects-bazel/builds/386#49798f07-966a-4185-a433-b81c17c198f6

Would you mind taking a look? Thank you very much!

This is the announcement email:
We are very close to remove in-memory //tools/default* package in favor of using @bazel_tools//tools/jdk: and @bazel_tools//tools/cpp: instead.
The changes will be ready with next release.

Motivation:
//tools/default was initially created as virtual in-memory package. It generates content dynamically based on current configuration. There is no need of having //tools/defaults any more as LateBoundAlias can generate dynamic configuration-based label resolving. Also, having //tools/default makes negative impact on performance, and introduces unnecessary code complexity.

All references to //tools/defaults:* targets should be removed or replaced to corresponding target in @bazel_tools//tools/jdk: and @bazel_tools//tools/cpp: packages.

Scope of changes and impact:
All targets in //tools/default will not exist any more. If you have any references inside your BUILD or *.bzl files to any of its, then bazel will fail to resolve.

Migration plan:

Please replace all occurrences:

//tools/defaults:jdk
-- by @bazel_tools//tools/jdk:current_java_runtime
-- or/and @bazel_tools//tools/jdk:current_host_java_runtime

//tools/defaults:java_toolchain
-- by @bazel_tools//tools/jdk:current_java_toolchain

//tools/defaults:crosstool
-- by @bazel_tools//tools/cpp:current_cc_toolchain
-- or/and @bazel_tools//tools/cpp:current_cc_host_toolchain
-- if you need reference to libc_top, then @bazel_tools//tools/cpp:current_libc_top

These targets will not be supported any more:
//tools/defaults:coverage_report_generator
//tools/defaults:coverage_support

BazelCI broken on ubuntu 18.04

With 28d48b0, I believe we raised the ubuntu CI machine config from 16.04 to 18.04

Unfortunately, I don't think CI has ever passed on 18.04.

Example breakage:
https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2091#ad491a93-0152-4a50-a363-876f1318cb59

WARNING: java.io.IOException: No such file or directory
--
  | Compiling module io.bazel.sample.SampleApp
  | [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User'

Maybe something related to java version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.