gritql icon indicating copy to clipboard operation
gritql copied to clipboard

No ability to print multiple logs

Open jsardev opened this issue 1 year ago • 5 comments

I'm a bit confused about why running log logs only the first log and then nothing else. Could all the log executions be visible in stdout? 🤔

jsardev avatar Jun 21 '24 13:06 jsardev

I'm not sure what you mean by this. Please provide the commands and code you use to reproduce.

morgante avatar Jun 21 '24 17:06 morgante

engine marzano(0.1)
language js

string_fragment() as $fragment where {
    log(message = $fragment)
}
console.log("Hello, Dan")
console.log("Hello, James")

https://app.grit.io/studio?key=4-_6OE96nQtRDugIa2Hep

@morgante I was expecting to see logs for both occurences, but when I run this via grit apply - I only see the first log execution.

jsardev avatar Jun 27 '24 19:06 jsardev

Ah ok, the studio only shows the first log currently.

They should all show up on the CLI.

morgante avatar Jun 27 '24 19:06 morgante

Yeah I provided a studio link for faster showcase of the code, but I'm testing it via CLI and it doesn't work there – I'm only getting the first log() 🤔 CleanShot 2024-06-27 at 21 37 18@2x

jsardev avatar Jun 27 '24 19:06 jsardev

Ah it's possibly related to this: https://github.com/getgrit/gritql/blob/main/crates/marzano_messenger/src/emit.rs#L141

morgante avatar Jun 27 '24 19:06 morgante