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
[feature] output forwarding from bazel processes #198
Conversation
f1d3a20
to
099cef5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, but the test fails - I couldn't spot the reason
ohh and I thing that it would be nice to color (or make it bold if it is possible) |
bazelrunner/src/main/java/org/jetbrains/bsp/bazel/bazelrunner/BazelProcess.java
Outdated
Show resolved
Hide resolved
I think I have a race condition. Working on a fix. |
The problem is that the sync console displays color but the build console doesn't (and you see some unprintable characters). So I just carefully enabled colors only on calls when it is useful and displays in sync console. If I colored the Invoking it would not always display correctly :/ |
099cef5
to
9fbe5bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update changelog + logging to file
9fbe5bf
to
37543e2
Compare
Now, each bazel process run with
BazelRunner
(whenwaitAndGetResult()
is called) will send log message to bsp-client:Running: [command] and forward stdout and stderr. The output is also collected to string and lines list for later use.
PR also includes some refactoring to vavr, refactoring of bazel flags etc.
I also replaced includedTargets and excludedTargets pair with single class TargetSpecs. In the future I imagine it as the main way to specify what should be built/run. It can also contain directories to derive targets from. Bazel runner could resolve what to run and run it.