Skip to content

Consider replacing javaparser gRPC/subprocess #318

@alexeagle

Description

@alexeagle

rules_python made this change in bazel-contrib/rules_python#1895
because tree-sitter is crazy fast, and it also relieves the need for the gazelle Go binary to spawn subprocesses that require other language runtimes, instead it's statically linked.

I'm seeing an issue just trying to run the tests in a clean clone of this repo:

INFO: From Testing //java/gazelle/testdata:grpc:
==================== Test output for //java/gazelle/testdata:grpc:

        files.go:192: expected gazelle stderr: 
            got: Error: LinkageError occurred while loading main class com.github.bazel_contrib.contrib_rules_jvm.javaparser.generators.Main
                java.lang.UnsupportedClassVersionError: com/github/bazel_contrib/contrib_rules_jvm/javaparser/generators/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
            {"level":"fatal","error":"failed to start / connect to javaparser server: failed to read port from javaparser server - maybe it crashed: timed out waiting for port file to be written by javaparser server","message":"could not start javaparser"}

which I think is because it's not hermetic in locating a JRE to execute this.

The Java/gRPC dependency also makes this repo a lot more complicated than it needs to be.

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