Skip to content

Load using-module bytecode before @after_compile checks#13

Open
futhr wants to merge 1 commit intoalexocode:mainfrom
futhr:elixir-1-19-compat
Open

Load using-module bytecode before @after_compile checks#13
futhr wants to merge 1 commit intoalexocode:mainfrom
futhr:elixir-1-19-compat

Conversation

@futhr
Copy link
Copy Markdown

@futhr futhr commented Apr 22, 2026

Elixir 1.19's compiler no longer auto-loads the using module before @after_compile fires, so function_exported?/2 reports false for the freshly compiled struct and Brex.Operator (and any user struct rule) fails to compile with "is not a struct".

Force-load the bytecode passed to the callback before running the struct + evaluate/2 checks, and add Elixir 1.19 / OTP 28 to the CI matrix so the regression is caught upstream.

Elixir 1.19's compiler no longer auto-loads the using module before
@after_compile fires, so function_exported?/2 reports false for the
freshly compiled struct and Brex.Operator (and any user struct rule)
fails to compile with "is not a struct".

Force-load the bytecode passed to the callback before running the
struct + evaluate/2 checks, and add Elixir 1.19 / OTP 28 to the CI
matrix so the regression is caught upstream.
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 participant