Skip to content

Transpiling to JavaScript causes problems #2412

Closed
@alexeagle

Description

@alexeagle

Many users don't have Java on their machines anymore. Installing it is slow and confusing and a major blocker to adoption. Currently Closure Compiler uses GWT to transpile to a native JS distro.

There are a bunch of bugs with the current approach.

Aside from these bugs, supporting compiling to JS is an unnecessary distraction for the core team. Will you chase down the long tail of compatibility issues? What if we just stopped doing this?

Users may also want to use Bazel. (Angular has announced at ngConf day3 keynote that we'll push this.) So we still need a way to get a Java runtime onto their machines.
Bazel is about to release their solution to this problem:
bazelbuild/bazel#1666

The approach:

  • ship an OpenJDK JRE to npm (for the three major architectures, windows, darwin x64, linux x64)
  • either statically link it into the google-closure-compiler package or make it a separate peerDependency
  • closure compiler binary runs Java without the user needing to know about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions