Skip to content
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

Gazelle fails on Windows with "java.nio.file.InvalidPathException: Illegal char <:> at index 2" #262

Closed
bartoszpop opened this issue May 1, 2024 · 1 comment

Comments

@bartoszpop
Copy link
Contributor

bazel run gazelle fails on Windows with the following error:

INFO GrpcServer - Set of classes in c:\users\bpopiela_bazel1\q6mbxjwl\execroot\my-pro1\bazel-1\x64_wi2\bin\external\bp_bazel\tools\gazelle\gazell2.run\my-pro1\src\test\java has no package
ERROR ClasspathParser - JavaTools failed to parse [SimpleFileObject[C:\Users\bpopiela\IdeaProjects\my-project\src\test\java\SomeClassTest.java]], skipping file
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/bpopiela/IdeaProjects/my-project/src/test/java/SomeClassTest.java
at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
at java.base/java.nio.file.Path.of(Path.java:147)
at java.base/java.nio.file.Paths.get(Paths.java:69)
at com.github.bazel_contrib.contrib_rules_jvm.javaparser.generators.ClasspathParser$ClassScanner.visitCompilationUnit(ClasspathParser.java:183)
at com.github.bazel_contrib.contrib_rules_jvm.javaparser.generators.ClasspathParser$ClassScanner.visitCompilationUnit(ClasspathParser.java:171)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:614)
at com.github.bazel_contrib.contrib_rules_jvm.javaparser.generators.ClasspathParser.parseFileGatherDependencies(ClasspathParser.java:161)
at com.github.bazel_contrib.contrib_rules_jvm.javaparser.generators.ClasspathParser.parseClasses(ClasspathParser.java:148)
at com.github.bazel_contrib.contrib_rules_jvm.javaparser.generators.GrpcServer$GrpcService.getImports(GrpcServer.java:126)
at com.github.bazel_contrib.contrib_rules_jvm.javaparser.generators.GrpcServer$GrpcService.parsePackage(GrpcServer.java:105)
at com.gazelle.java.javaparser.v0.JavaParserGrpc$methodHandlers.invoke(JavaParserGrpc.java:210)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:182)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:866)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

illicitonion pushed a commit that referenced this issue May 2, 2024
…#263)

Fix `bazel run gazelle` failing with
`java.nio.file.InvalidPathException: Illegal char <:> at index 2`
(#262).
@illicitonion
Copy link
Collaborator

Fixed by #263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants