Skip to content

Commit

Permalink
Add comment to msg unrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell authored and supermario committed Aug 31, 2024
1 parent 4547820 commit b8ec24b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extra/Lamdera/Injection.hs
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,12 @@ injections outputType =
{
if (buriedTimestamp !== null) {
const elapsed = Date.now() - buriedTimestamp;
// This tries to turn `HomePageMsg (WeatherWidgetMsg (WeatherReportReceived WeatherReport))`
// into `"HomePageMsg WeatherWidgetMsg WeatherReportReceived"`.
// The idea is that if the timeout for forwarding messages isn't enough, we want to know what
// message somebody used that took even longer, but without reporting the entire msg.
// Note that in `--optimize` mode, the above string would become something like `"1 3 6"`,
// but it's better than nothing.
let msgName = '(unknown message)';
if (msg.$) {
msgName = msg.$;
Expand Down

0 comments on commit b8ec24b

Please sign in to comment.