-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
elm make
hang then runaway memory usage from orphan process
#2241
elm make
hang then runaway memory usage from orphan process
#2241
Comments
Thanks for reporting this! To set expectations:
Finally, please be patient with the core team. They are trying their best with limited resources. |
Hello, We encountered the same problem in our code after I mistakenly swapped the arguments of the set function in a lens. It looks to me that we encountered the same typechecker bug: module Main exposing (..)
type alias Lens a b =
{ get : a -> b
, set : b -> a -> a
}
oopsLens : Lens { b | oops : a } b
oopsLens = Lens .oops (\x oops -> { x | oops = oops }) |
Ran into a similar issue, though not from mistakenly swapping arguments, this was from a use of module Main exposing (..)
type X r
= X
f : X r -> X { r | y : () }
f _ =
X
x : X { z : () }
x =
X
example : ()
example =
x
|> (if True then
f
else
identity
)
|> always () That causes |
This fixes elm#2241 Preliminary testing seems to indicate this isn't as bad of a slowdown as it may seem. For more details see Zokka-Dev/zokka-compiler#20 This is meant as a reference PR for other people working on the Elm compiler.
Quick Summary: Compilation hangs and an elm process remains active after
<ctrl-c>
. Memory usage of this process reaches >16GB (memory available to system) which bogged down my system.SSCCE
Additional Details
elm make
hangs after printingCompiling ...
. The orphan elm process only continues if waiting for longer than 5-6 seconds before using to cancel the elm make command.When changing
(\( low, high ) x ->
to(\x ( low, high ) ->
the snippet compiles as expected, and changing( min low x, max high x )
to( x, x )
results in the compiler error`foldMap` needs the 4th argument to be: ( ∞, ∞ )
.Came across this writing a foldMap to calculate the min and max of a List Float but have simplified to get a minimal reproduction.
Love your work!
The text was updated successfully, but these errors were encountered: