gleam-lang/gleam
View on GitHubDetermine why this code causes the Erlang compiler to run for a very long time
Open
#4,985 opened on Sep 17, 2025
help wanted
Repository metrics
- Stars
- (21,417 stars)
- PR merge metrics
- (Avg merge 10d 19h) (69 merged PRs in 30d)
Description
When Erlang inlining is enabled this code takes extreme amounts of time to compile: https://github.com/bondiano/telega-gleam/blob/33b3bfc2b7c45cd88d52e3edd4f45d9740190eb0/src/telega/update.gleam#L225
The long change of use expressions seems to be related. Let's determine a minimal reproduction in Erlang so we can report the bug to the Erlang folks.
Thanks to @sean-hale-dev for finding this and @bondiano for initial investigation
Prior discussion https://github.com/bondiano/telega-gleam/issues/27