Skip to content

Commit a910ab0

Browse files
committed
Add comment to msg unrolling
1 parent 27f9d4c commit a910ab0

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
@@ -264,6 +264,12 @@ injections outputType =
264264
{
265265
if (buriedTimestamp !== null) {
266266
const elapsed = Date.now() - buriedTimestamp;
267+
// This tries to turn `HomePageMsg (WeatherWidgetMsg (WeatherReportReceived WeatherReport))`
268+
// into `"HomePageMsg WeatherWidgetMsg WeatherReportReceived"`.
269+
// The idea is that if the timeout for forwarding messages isn't enough, we want to know what
270+
// message somebody used that took even longer, but without reporting the entire msg.
271+
// Note that in `--optimize` mode, the above string would become something like `"1 3 6"`,
272+
// but it's better than nothing.
267273
let msgName = '(unknown message)';
268274
if (msg.$) {
269275
msgName = msg.$;

0 commit comments

Comments
 (0)