JetBrains/bazel-bsp

UX of import in case of incorrect BUILD files

lukaszwawrzyk opened this issue · 0 comments

I added an incorrect library dependencies in one of my BUILD files. I refreshed the project (btw the Reload All BSP Projects icon is usually disabled for some reason).
I got this log:

Loading: 
Loading: 0 packages loaded
WARNING: /private/var/tmp/_bazel_uwawrzyk/53d37b7a4e286cf23f2f999e47d8cfee/external/local_jdk/BUILD.bazel:165:10: target '@local_jdk//:jre-default' is deprecated: Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)
WARNING: /private/var/tmp/_bazel_uwawrzyk/53d37b7a4e286cf23f2f999e47d8cfee/external/local_jdk/BUILD.bazel:133:10: target '@local_jdk//:jre-bin' is deprecated: Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)
Analyzing: 61 targets (0 packages loaded, 0 targets configured)
INFO: Analyzed 61 targets (0 packages loaded, 0 targets configured).
INFO: Found 61 targets...
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
INFO: Elapsed time: 0.348s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
Loading:
Loading: 0 packages loaded
WARNING: /private/var/tmp/_bazel_uwawrzyk/53d37b7a4e286cf23f2f999e47d8cfee/external/local_jdk/BUILD.bazel:165:10: target '@local_jdk//:jre-default' is deprecated: Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)
WARNING: /private/var/tmp/_bazel_uwawrzyk/53d37b7a4e286cf23f2f999e47d8cfee/external/local_jdk/BUILD.bazel:133:10: target '@local_jdk//:jre-bin' is deprecated: Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)
Analyzing: 61 targets (0 packages loaded, 0 targets configured)
INFO: Analyzed 61 targets (0 packages loaded, 0 targets configured).
INFO: Found 61 targets...
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
INFO: Elapsed time: 0.348s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
Loading: 
Loading: 0 packages loaded
Command aborted with reason ANALYSIS_FAILURE:
gru 14, 2021 4:09:17 PM io.grpc.internal.SerializingExecutor run

SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable@75b2b3f7

java.lang.RuntimeException: Command aborted with reason ANALYSIS_FAILURE: 

	at org.jetbrains.bsp.bazel.server.bep.BepServer.consumeAbortedEvent(BepServer.java:246)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.processAbortedEvent(BepServer.java:235)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.handleEvent(BepServer.java:107)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:28)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:9)

	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:251)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:309)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:292)

	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:782)

	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)

	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

	at java.lang.Thread.run(Thread.java:748)



gru 14, 2021 4:09:17 PM io.grpc.netty.NettyServerHandler onStreamError

WARNING: Stream Error

io.netty.handler.codec.http2.Http2Exception$StreamException: Received DATA frame for an unknown stream 11

	at io.netty.handler.codec.http2.Http2Exception.streamError(Http2Exception.java:129)

	at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.shouldIgnoreHeadersOrDataFrame(DefaultHttp2ConnectionDecoder.java:531)

	at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onDataRead(DefaultHttp2ConnectionDecoder.java:183)

	at io.netty.handler.codec.http2.Http2InboundFrameLogger$1.onDataRead(Http2InboundFrameLogger.java:48)

	at io.netty.handler.codec.http2.DefaultHttp2FrameReader.readDataFrame(DefaultHttp2FrameReader.java:422)

	at io.netty.handler.codec.http2.DefaultHttp2FrameReader.processPayloadState(DefaultHttp2FrameReader.java:251)

	at io.netty.handler.codec.http2.DefaultHttp2FrameReader.readFrame(DefaultHttp2FrameReader.java:160)

	at io.netty.handler.codec.http2.Http2InboundFrameLogger.readFrame(Http2InboundFrameLogger.java:41)

	at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.decodeFrame(DefaultHttp2ConnectionDecoder.java:118)

	at io.netty.handler.codec.http2.Http2ConnectionHandler$FrameDecoder.decode(Http2ConnectionHandler.java:390)

	at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:450)

	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)

	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441)

	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)

	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408)

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)

	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)

	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)

	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677)

	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612)

	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529)

	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491)

	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)

	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

	at java.lang.Thread.run(Thread.java:748)



Command aborted with reason ANALYSIS_FAILURE:
gru 14, 2021 4:09:19 PM io.grpc.internal.SerializingExecutor run

SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable@efba960

java.lang.RuntimeException: Command aborted with reason ANALYSIS_FAILURE: 

	at org.jetbrains.bsp.bazel.server.bep.BepServer.consumeAbortedEvent(BepServer.java:246)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.processAbortedEvent(BepServer.java:235)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.handleEvent(BepServer.java:107)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:28)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:9)

	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:251)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:309)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:292)

	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:782)

	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)

	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

	at java.lang.Thread.run(Thread.java:748)



Command aborted with reason ANALYSIS_FAILURE:
gru 14, 2021 4:09:20 PM io.grpc.internal.SerializingExecutor run

SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable@1ce32d47

java.lang.RuntimeException: Command aborted with reason ANALYSIS_FAILURE: 

	at org.jetbrains.bsp.bazel.server.bep.BepServer.consumeAbortedEvent(BepServer.java:246)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.processAbortedEvent(BepServer.java:235)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.handleEvent(BepServer.java:107)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:28)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:9)

	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:251)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:309)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:292)

	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:782)

	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)

	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

	at java.lang.Thread.run(Thread.java:748)



Command aborted with reason ANALYSIS_FAILURE:
gru 14, 2021 4:09:21 PM io.grpc.internal.SerializingExecutor run

SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable@7974dbed

java.lang.RuntimeException: Command aborted with reason ANALYSIS_FAILURE: 

	at org.jetbrains.bsp.bazel.server.bep.BepServer.consumeAbortedEvent(BepServer.java:246)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.processAbortedEvent(BepServer.java:235)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.handleEvent(BepServer.java:107)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:28)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:9)

	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:251)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:309)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:292)

	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:782)

	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)

	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

	at java.lang.Thread.run(Thread.java:748)



Command aborted with reason ANALYSIS_FAILURE:
gru 14, 2021 4:09:24 PM io.grpc.internal.SerializingExecutor run

SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable@26668e39

java.lang.RuntimeException: Command aborted with reason ANALYSIS_FAILURE: 

	at org.jetbrains.bsp.bazel.server.bep.BepServer.consumeAbortedEvent(BepServer.java:246)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.processAbortedEvent(BepServer.java:235)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.handleEvent(BepServer.java:107)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:28)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:9)

	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:251)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:309)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:292)

	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:782)

	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)

	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

	at java.lang.Thread.run(Thread.java:748)



Command aborted with reason ANALYSIS_FAILURE:
gru 14, 2021 4:09:28 PM io.grpc.internal.SerializingExecutor run

SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable@6d2a5fe1

java.lang.RuntimeException: Command aborted with reason ANALYSIS_FAILURE: 

	at org.jetbrains.bsp.bazel.server.bep.BepServer.consumeAbortedEvent(BepServer.java:246)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.processAbortedEvent(BepServer.java:235)

	at org.jetbrains.bsp.bazel.server.bep.BepServer.handleEvent(BepServer.java:107)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:28)

	at org.jetbrains.bsp.bazel.server.bep.BepStreamObserver.onNext(BepStreamObserver.java:9)

	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:251)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(ServerCallImpl.java:309)

	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:292)

	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:782)

	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)

	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

	at java.lang.Thread.run(Thread.java:748)

the project sync was reported as a success. I think it should be marked as error, and the log should show what bazel outputs:


ERROR: /Users/uwawrzyk/workspace/BazelExample/jvm_hello/src/test/java/com/hello/tests/BUILD:1:10: no such target '@maven//:junit_junit54': target 'junit_junit54' not declared in package '' (did you mean 'junit_junit'?) defined by /private/var/tmp/_bazel_uwawrzyk/53d37b7a4e286cf23f2f999e47d8cfee/external/maven/BUILD and referenced by '//jvm_hello/src/test/java/com/hello/tests:test'
ERROR: Analysis of target '//jvm_hello/src/test/java/com/hello/tests:test' failed; build aborted: Analysis failed
INFO: Elapsed time: 8.160s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (63 packages loaded, 685 targets configured)