Skip to content

Commit b8ec24b

Browse files
lydellsupermario
authored andcommitted
Add comment to msg unrolling
1 parent 4547820 commit b8ec24b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

extra/Lamdera/Injection.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,12 @@ injections outputType =
583583
{
584584
if (buriedTimestamp !== null) {
585585
const elapsed = Date.now() - buriedTimestamp;
586+
// This tries to turn `HomePageMsg (WeatherWidgetMsg (WeatherReportReceived WeatherReport))`
587+
// into `"HomePageMsg WeatherWidgetMsg WeatherReportReceived"`.
588+
// The idea is that if the timeout for forwarding messages isn't enough, we want to know what
589+
// message somebody used that took even longer, but without reporting the entire msg.
590+
// Note that in `--optimize` mode, the above string would become something like `"1 3 6"`,
591+
// but it's better than nothing.
586592
let msgName = '(unknown message)';
587593
if (msg.$) {
588594
msgName = msg.$;

0 commit comments

Comments
 (0)