Skip to content
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

Ensure event modules are loaded during deserialization #2020

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

arbulu89
Copy link
Contributor

@arbulu89 arbulu89 commented Nov 21, 2023

Description

Ensure the event module is loaded during deserialization, otherwise function_exported? doesn't return the expected response, as this function doesn't load the modules.
Without, this the upcasting and superseding of the modules wasn't happening with legacy events, which were not being loaded in some cases, I guess because they are not used anywhere during compilation (my guess).

Some refs:
elixir-lang/elixir#11524
https://hexdocs.pm/elixir/Kernel.html#function_exported?/3
https://hexdocs.pm/elixir/Code.html#ensure_loaded?/1

How was this tested?

Tested manually. As discussed with @CDimonaco , we need some integration test to check if the migration doesn't fail.

@arbulu89 arbulu89 added the bug Something isn't working label Nov 21, 2023
@arbulu89 arbulu89 marked this pull request as ready for review November 21, 2023 14:12
@arbulu89 arbulu89 merged commit f8623fa into main Nov 21, 2023
30 checks passed
@arbulu89 arbulu89 deleted the eventstore-deserialize-code-loaded branch November 21, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

None yet

2 participants