Open whisperity opened 3 years ago
I cannot reproduce this bug in my development environment with LLVM 10. However the bug is still present on https://codecompass.net/demo/ , where it was located initally.
Since codecompass.net uses the modelcpp/codecompass:web-pgsql
Docker image we produce, that could be the next target for debugging locally.
Okay, at the top of my head, we should check the following, because Clang tries to be too smart about what escape sequences it emits or what sort of callbacks it runs... Most likely it doesn't detect that the shell it is running in would be capable of using colours.
TERM=xterm-256color
and COLORTERM=24bit
or COLORTERM=truecolor
(or something at least compatible with the effect of these) should be set.libtinfo5
(and libtinfo-dev
) should be installed.
clang-10
-> llvm-10-dev
-> libtinfo-dev
should already have the latter package installed...The source of the issue indeed seems to be when the docker container is executed in detached mode (-d
).
Unfortunately, setting any of the proposed environment variables has no effect.
Well, that's sad, but not unexpected... :frowning: I'll try to look into it, mayhaps we can do some clever change to the inheritance we're already doing wrt. the ColorHTMLStream
or what its name was...
The current version when generating the AST HTML output does not seem to call the appropriate methods which would result in calls to our ANSI colours -> HTML sequences formatting. It is very likely that during the uplift to LLVM 10.0 (#432) we forgot to add a virtual method's override or something like that.
Oddly enough, some of the logic, such as putting things between
'
in the raw output to<tt>
still runs, as seen in the picture. The relevant code snippet that seems to get executed properly:https://github.com/Ericsson/CodeCompass/blob/e39c21346ccdfe8c36e12254c50e4932b2d3b3dd/plugins/cpp_reparse/service/src/asthtml.cpp#L54-L66