Repository navigation
fix: resolve Elixir 1.18 #Reference escaping compilation crash - #220
Conversation
marandaneto
left a comment
There was a problem hiding this comment.
suggestion: Add a patch changeset for this customer-facing compilation fix using sampo add, as described in RELEASING.md. This PR currently contains no changeset, so the fix is missing the release metadata and changelog entry used by the automated release workflow.
|
|
||
| @compiled_configuration_schema NimbleOptions.new!(@configuration_schema) | ||
| @compiled_convenience_schema NimbleOptions.new!(@convenience_schema) | ||
|
|
There was a problem hiding this comment.
nit: Format the changed files — these whitespace-only lines and the copied indentation in config_schema.ex fail the formatter check. Please run mix format lib/posthog/config.ex lib/posthog/config_schema.ex. Reproduction: reproduced — mix format --check-formatted lib/posthog/config.ex lib/posthog/config_schema.ex exits 1 and identifies both files as unformatted.
|
|
||
| with {:ok, validated} <- | ||
| NimbleOptions.validate(normalized_options, @compiled_configuration_schema) do | ||
| NimbleOptions.validate(normalized_options, PostHog.Config.Schema.configuration()) do |
There was a problem hiding this comment.
nit: Alias the schema module — the repeated fully qualified PostHog.Config.Schema calls introduce four Credo alias warnings, so strict Credo also fails independently of formatting. Please use a module alias for these calls. Reproduction: reproduced — MIX_ENV=test mix credo --strict exits 6 with four alias warnings on the reviewed head, while the same command passes at the merge-base.
your commits need to be signed |
d1ead19 to
c655a95
Compare
|
I've squashed the commits, signed them, and added a changeset file. |
|
sorry, i haven't setup my GPG key. i'm doing that now |
This commit also includes a changeset.
c655a95 to
f5dc8c6
Compare
|
ok, hope that everything is good now. |
dustinbyrne
left a comment
There was a problem hiding this comment.
looks great! thank you @boxxxie!
|
thanks a lot for being quick to release. i'm using the new version now. |
Elixir 1.18.3 and 1.18.4 introduced strict compiler validations that ban
#Referencestructs (whichRegex.compile!and~r//compile down into internally) from being embedded in module attributes and expanded inside function/macro ASTs.Because
@configuration_schemacontained regex defaults forsanitize_uris, attempting to reference it insideread!()caused a fatal crash on Elixir 1.18.4.This PR refactors the schemas to live inside a separate
PostHog.Config.Schemamodule and references them as standard functions at runtime to cleanly satisfy Elixir 1.18's AST boundaries without breaking functionality.