Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Logs Displayed in Console from Periphery #241

Open
Xopoko opened this issue Aug 21, 2024 · 1 comment
Open

No Logs Displayed in Console from Periphery #241

Xopoko opened this issue Aug 21, 2024 · 1 comment

Comments

@Xopoko
Copy link

Xopoko commented Aug 21, 2024

I'm running Periphery using the following Dangerfile script:

# Run Periphery
puts "Running Periphery..."
periphery.scan(config: '.periphery.yml', project: 'MyProject.xcworkspace')
puts "Periphery run completed."

In the CI console, I only see:

Running Periphery...
Periphery run completed.

It seems that no logs from Periphery itself are being shown. Is there a way to make the utility output everything it prints to the console?

Alternatively, is it possible to run Periphery separately and feed its JSON output to danger-periphery instead?

@manicmaniac
Copy link
Owner

manicmaniac commented Aug 28, 2024

As you mentioned, the feature is not implemented.
I understand the need but still wondering how to implement it.

The point is that danger-periphery blocks IO while it is running because it uses Open3.capture3 internally.
However, I think that console log should be implemented in smarter way, like non-blocking IO that is constantly written while running Periphery.

Using other methods like Kernel#spawn may solve this problem. I'll try it later (and I'm welcome PRs as well).

  1. Is there a way to make the utility output everything it prints to the console?

  2. is it possible to run Periphery separately and feed its JSON output to danger-periphery instead?

Although both ways sound good to me, 2 would be simpler considering the above blocking problem 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants