Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Executing mount.extensions.autostart/defstate twice breaks the state #32

Closed
alexander-yakushev opened this issue Nov 13, 2024 · 3 comments · Fixed by #33
Closed

Executing mount.extensions.autostart/defstate twice breaks the state #32

alexander-yakushev opened this issue Nov 13, 2024 · 3 comments · Fixed by #33

Comments

@alexander-yakushev
Copy link

alexander-yakushev commented Nov 13, 2024

(mount.extensions.autostart/defstate example :start 1)

@example ;; => 1 - works

(mount.extensions.autostart/defstate example :start 1)

@example ;; => java.lang.NullPointerException: Cannot invoke "java.util.concurrent.Future.get()" because "fut" is null

(:state @#'example) => ;; (:state @#'example)  #mount.lite.State{..., :sessions nil}

Apparently, evaluating mount.extensions.autostart/defstate the second time loses :sessions atom and the state becomes broken. I've seen this behavior of missing :session before and not only related to autostart extension, but this is the one I can reliably reproduce.

@aroemers
Copy link
Owner

Hi @alexander-yakushev, thanks for your issue report. Can you verify if the linked fix works for you?

@alexander-yakushev
Copy link
Author

Sorry for the delay! The fix appears to be working for the example I've given, thank you! I'll wait for the merge and release to validate that the fix works in my real usecases.

@aroemers
Copy link
Owner

Thank you for testing, it has been released as version 2.3.2.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants