Skip to content

Conversation

straight-shoota
Copy link
Member

Resolves #685

@beta-ziliani
Copy link
Member

Just noting that tests are failing

@straight-shoota
Copy link
Member Author

We're stopping execution of the current program with exec directly after emitting the last log message. Because of that, the async log dispatcher doesn't run anymore and the message never gets written.

For now I'm adding a patch to explicitly close the log backend, which flushes all pending message.

But this seems like a general problem that should be addressed in the Crystal repo.

@straight-shoota
Copy link
Member Author

The failure on Windows is due to crystal-lang/crystal#14422
So apparently we cannot use Process.exec on Windows just now.

else
raise Error.new("Error target #{name} was not found in #{SPEC_FILENAME}")
end
exit status.exit_code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this continue to raise for STATUS_BREAKPOINT because it is an abnormal exit?

Copy link
Member Author

@straight-shoota straight-shoota Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes 🙈 I've been responsible for the last Process::Status API revamp, but still manage to mistake it.

Maybe the confusing part is that #exit_code? returns nil for abnormal exits, which makes sense on Unix (abnormal states are not exit codes), but less so on Windows where they indeed are exit codes. Maybe that's not right...? 🤔

Or we should just use #system_exit_status here... On Windows it fits exactly what we need.

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

Successfully merging this pull request may close these issues.

shards run cannot handle all exit statuses
4 participants