specs-feup / clava

C/C++ Source-to-Source Tool based on Clang
Apache License 2.0
74 stars 11 forks source link

Clava Tool: Redirect console.log and related methods #77

Closed joaonmatos closed 1 year ago

joaonmatos commented 2 years ago

Currently, console.log and other similar methods are not showing up in the console output of the Clava tool web app.

What is happening to that output? Blackholed? Spamming logs?

Redirection should be set up for console methods as well. Perhaps using the out, err, in options of the Truffle context API? https://www.graalvm.org/truffle/javadoc/org/graalvm/polyglot/Context.Builder.html

lm-sousa commented 2 years ago

I remember getting an output from these functions. It might have been in some of my test branches, though. The only problem I had was that console.log() did not automatically add a newline (\n) at the end of the string.

lm-sousa commented 2 years ago

When you are talking about "Clava console output" are you referring to the output window in the Clava UI or in the terminal when executing Clava without the UI?

joaonmatos commented 2 years ago

Clava Tool web app.

joaonmatos commented 2 years ago

Aka the best prototyping sandbox we have

lm-sousa commented 2 years ago

Sometimes I forget that even exists... We need to have tags/labels for bug reports.

joaonmatos commented 2 years ago

I did put the name of the tool in the title 😅

lm-sousa commented 1 year ago

Solved with the changes introduced in specs-feup/lara-framework#33 and specs-feup/specs-java-libs#9