Closed anb0s closed 7 years ago
In eclox.core.doxygen.Doxygen.build you use ProcessBuilder.redirectErrorStream to merge stdout and stderr. This way you have no control over the output lines if the external process doesn't sync its output. It looks like that ProcessBuilder does not take care about that issue.
To work around that issue the client software needs to implement the synchronization by itself or handle the streams separately. So don't use redirectErrorStream. Read the error stream directly and use just this output to parse for warnings and errors. The output of stdout can be used for progress messages. May be you can drop the console at all. Just an idea.
Update: Tried to test my idea, but I need maven to build the plug-ins right? Could you provide a short "how to build"?
I've created wiki site: https://github.com/anb0s/eclox/wiki/How-to-build
Please check "Running and debugging in Eclipse" if want try it in eclipse first and "Building eclox plugin with update site for testing" if want to build it with maven + tycho and install...
Any enhancements or questeions to the wiki page are welcome :)
Yes, i think you right :)
In the eclox.core.doxygen.Doxygen.BuildJob.run() the streams are handled independently:
// stdin and stderr
MyLogFeeder inputLogFeeder = new MyLogFeeder(buildProcess.getInputStream());
Thread inputLogThread = new Thread(inputLogFeeder);
MyLogFeeder errorLogFeeder = new MyLogFeeder(buildProcess.getErrorStream());
Thread errorLogThread = new Thread(errorLogFeeder);
but in the eclox.core.doxygen.Doxygen.build() i've changed to ProcessBuilder in versions 0.11.x and made this mistake:
pb.redirectErrorStream(true);
Looks like you nailed it. So no need for me to contribute :(
Thanks for reporting the bug and pointing in the code 👍
It would be good if you can verify it, because i cannot reproduce this here with my doxyfiles at Windows and Linux. Also it would be good to know if my wiki description is clear :) So please contribute if you want!
Had a quick look into the how-to. You wrote "switch to master branch". Is it a good idea to tell conrtibutors to work on the master branch?
To test if the bug is fixed for my machine at work (where the problem occurred) you have to provide me a build. I can't setup the build env here.
For a pull request contributors have to fork the project at GitHub and they can work at master, because master is the working branch for me. But you are right i will write that they have to created sub-branch from master for a fix.
Wiki updated...
fixed for 0.12.0
please check out the testing build --> #202 comment and reopen if still not solved Thanks!
Issue seams to be fixed for me. No overlapping output anymore. But the console lists output after the "finished..." information of Doxygen. That is somehow irritating.
Issue seams to be fixed for me. No overlapping output anymore.
Thanks for the feedback :+1: Then it looks good now.
But the console lists output after the "finished..." information of Doxygen. That is somehow irritating.
Yes, i see it too during my builds. The stdin and stderr are handled in two not depended threads and it looks like the stderr steam is catched later by JVM... i've no idea how to fix yet...
Don't use two Threads. One should be sufficient.
related to #195