Bump dependencies to latest major versions#14
Conversation
|
I think that after certain version, @external(erlang, "erlang", "spawn")
fn spawn(a: fn() -> anything) -> Pid
@external(erlang, "erlang", "spawn_link")
fn spawn_link(a: fn() -> anything) -> Pidgleam_erlang v1.0.0: @external(erlang, "proc_lib", "spawn_link")
pub fn spawn(running: fn() -> anything) -> Pid
@external(erlang, "proc_lib", "spawn")
pub fn spawn_unlinked(a: fn() -> anything) -> PidSo yea, the fail on tests are intended, nothing to worry about :D |
|
Instead of vendoring carpenter, I would instead suggest to reference Guillaume's fork as a git dependency like so: carpenter = { git = "https://github.com/ghivert/carpenter.git", ref = "main" }I might eventually get rid of it, since it's not absolutely needed, but git dep feels a little lighter for me for now. |
|
Yep, that's much better |
|
According to the docs: https://hexdocs.pm/lustre/lustre.html#start_server_component
I think we'll need a shutdown message to the component in the close handler, I'd say like this: let socket_close = fn(state: Socket(a)) {
server_component.deregister_subject(state.self)
|> lustre.send(to: state.component)
lustre.shutdown()
|> lustre.send(to: state.component)
}
|
|
Please also set Gleam to |
|
The server components are now cleaning up properly. Thanks for pointing that out! |
JonasGruenwald
left a comment
There was a problem hiding this comment.
Thank you very much for your help!

Closes #13.
Additionally,
carpenterpackage has a PR to fit into Gleam's new features. Until that PR is merged, a local package will be within thepackagesfolder.I ran the playground, and the tool seems to be working. However, some tests unexpectedly receive
ProcLib(InitP, 3)messages instead ofErlang(Apply, 2).