Skip to content

Conversation

@kim
Copy link
Contributor

@kim kim commented Aug 13, 2025

The Clone impl for ClientConnection would create an independent
instance that could not observe module hotswapping. This would result in
methods called on a replaced ModuleHost to fail, because that host
exited already.

Fix by reading the ModuleHost from the watch channel directly, instead
of maintaining a redundant copy.

Also fix watch_module_host to properly mark the current module host as
seen.

Expected complexity level and risk

2

Testing

  • test suite passes
  • ran @bfops repro script

The `Clone` impl for `ClientConnection` would create an independent
instance that could not observe module hotswapping. This would result in
methods called on a replaced `ModuleHost` to fail, because that host
exited already.

Fix by reading the `ModuleHost` from the watch channel directly, instead
of maintaining a redundant copy.

Also fix `watch_module_host` to properly mark the current module host as
seen.
@kim kim force-pushed the kim/fix/hotswapping branch from 5c309bb to 14d2827 Compare August 13, 2025 11:58
@jdetter
Copy link
Collaborator

jdetter commented Aug 13, 2025

@bfops confirmed as well this this specifically fixed the module hot-reloading issue that we were having when he retested

@kim kim added this pull request to the merge queue Aug 13, 2025
Merged via the queue into master with commit b445620 Aug 13, 2025
35 of 36 checks passed
@kim kim deleted the kim/fix/hotswapping branch August 13, 2025 20:18
bfops pushed a commit that referenced this pull request Aug 20, 2025
The `Clone` impl for `ClientConnection` would create an independent
instance that could not observe module hotswapping. This would result in
methods called on a replaced `ModuleHost` to fail, because that host
exited already.

Fix by reading the `ModuleHost` from the watch channel directly, instead
of maintaining a redundant copy.

Also fix `watch_module_host` to properly mark the current module host as
seen.

# Expected complexity level and risk

2

# Testing

- [x] test suite passes
- [x] ran @bfops repro script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1.3.0] Reducer calls fail with 'No Such Module' after publishing module on server with connected client

4 participants