shorebird icon indicating copy to clipboard operation
shorebird copied to clipboard

fix: Shorebird disables gradle println

Open TheCarpetMerchant opened this issue 2 years ago • 8 comments

Description

I have println calls in my build.gradle. Using shorebird, these are not seen in the console. -v doesn't work.

TheCarpetMerchant avatar Dec 12 '23 19:12 TheCarpetMerchant

shorebird just calls out to flutter build under the covers. You can try running with -v to see all the commands shorebird is executing. Presumably we're just not piping the prints through.

eseidel avatar Dec 12 '23 19:12 eseidel

shorebird just calls out to flutter build under the covers. You can try running with -v to see all the commands shorebird is executing. Presumably we're just not piping the prints through.

I have used -v, see initial comment.

TheCarpetMerchant avatar Dec 12 '23 20:12 TheCarpetMerchant

I believe we only forward verbose output when the invoked command fails (https://github.com/shorebirdtech/shorebird/blob/main/packages/shorebird_cli/lib/src/process.dart#L213-L214). I forget the exact conversation that led to this decision, but I believe we were trying to balance signal-to-noise in the logs (as verbose is very verbose)

bryanoltman avatar Dec 12 '23 20:12 bryanoltman

But either way, invoking the flutter build command manually should print what you want to see

bryanoltman avatar Dec 12 '23 20:12 bryanoltman

It's possible the right solution would be to add an extra level (or levels) of verbosity to the CLI that would log stdout/stderr regardless of whether the invoked command failed.

bryanoltman avatar Dec 12 '23 20:12 bryanoltman

Given the amount of data output

trying to balance signal-to-noise in the logs (as verbose is very verbose)

Agreed on the amount of data being outputted, but it's that way for a reason. Given the sheer amount of different systems interacting, too much information is better than not enough. Different levels of verbosity can be applied, but I would default to what the different underlying systems do by default too.

TheCarpetMerchant avatar Dec 12 '23 20:12 TheCarpetMerchant

Presumably the solution here is to add another layer of verbosity as bryan suggests.

eseidel avatar Jun 12 '24 19:06 eseidel

Context:

Since this was filed, we've updated the CLI to pass the --verbose flag to flutter when it's passed to the CLI. We (I think I was the one who did this, but not sure) originally tried passing --verbose to every command, but not all of our CLI artifacts recognize --verbose. I forget which, but some expect -verbose and some only recognize -v.

bryanoltman avatar Jun 12 '24 22:06 bryanoltman