Skip to content

v3.0.0-rc.0: breaking changes#338

Open
smn wants to merge 1 commit into
developfrom
release/3-0-0
Open

v3.0.0-rc.0: breaking changes#338
smn wants to merge 1 commit into
developfrom
release/3-0-0

Conversation

@smn
Copy link
Copy Markdown
Contributor

@smn smn commented May 7, 2026

Summary

First release candidate for v3.0.0. Lands every breaking change deferred to a major version in CRITICAL_REVIEW.md (Phase 7) plus full removal of the V2 parser/evaluator. Cut as an rc so engage CI can surface migration work before final tag.

Breaking changes

  • Context.new/2 no longer normalizes by default. lowercase_keys and coerce_strings both default to false. Variable lookup remains case-insensitive at evaluation time. Pass lowercase_keys: true, coerce_strings: true to restore v2 behavior.
  • :skip_context_evaluation? removed. Use coerce_strings: false.
  • String literals inside expressions are no longer re-evaluated as templates. Top-level evaluate_as_string!/3 is unchanged. Use Expression.evaluate_template/3 for explicit template resolution inside callback arguments.
  • Expression.error/1 removed. Use Expression.error_map/1 for the legacy map shape, or raise Expression.Error.
  • = on two DateTimes now compares full DateTime (matches ==). v2 incorrectly compared only the date portion via Date.compare/2.
  • Entire V2 parser/evaluator removed. Expression.V2, V2.Parser, V2.Compile, V2.Context, V2.Eval, V2.Callbacks, V2.Callbacks.Standard, V2.Autodoc, V2.Compat are all gone. Static-analysis consumers (engage's Turn.Dsl.Validation / Turn.Dsl.Parser) will need to migrate to V1's AST surface or grow new compile-to-AST capabilities — this is the rc's primary forcing function.
  • Benchmarks + benchee dep removed. The benchmark/ directory existed for V1↔V2 comparison; with V2 gone it has no purpose. benchee, deep_merge, statistex removed from mix.lock.

Why an rc

tag-and-discover is the strategy: cut the rc, run engage's full CI against it, address fallout (engage's V2 references in Turn.Dsl.Validation / Turn.Dsl.Parser, the one Expression.error/1 call site in turn/build/callbacks.ex:188), then bump to 3.0.0 final.

Test plan

  • mix test — 386 doctests, 235 tests, 0 failures
  • mix credo --strict — no issues
  • mix format --check-formatted — clean
  • mix compile --warnings-as-errors — clean
  • Run engage CI against 3.0.0-rc.0 to surface migration work
  • Address engage fallout (V2 deps, Expression.error/1 call site)
  • Tag 3.0.0 final once rc is green

Files

See CHANGELOG.md for the user-facing changelog and V3_PLAN.md for the implementation plan with consumer-impact notes.

@smn smn requested a review from santiagocardo May 7, 2026 15:49
Copy link
Copy Markdown
Contributor

@santiagocardo santiagocardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great 🔥✨🎉
Happy to try this new version on PROD. I hope this fixes existing bugs, especially the ones related to type coercions 🤞

Comment thread lib/expression/eval.ex
Comment on lines 203 to +204
def op(:=, a, b) when is_struct(a, DateTime) and is_struct(b, DateTime),
do: Date.compare(a, b) == :eq
do: DateTime.compare(a, b) == :eq
Copy link
Copy Markdown
Contributor

@santiagocardo santiagocardo May 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that at some point should highlight this as a syntax error. Users should use == instead.

Comment thread CLAUDE.md
Comment on lines 46 to +47

Both use [NimbleParsec](https://hexdocs.pm/nimble_parsec) for parsing.
(The experimental V2 parser/evaluator was removed in v3.0.0.)
Copy link
Copy Markdown
Contributor

@santiagocardo santiagocardo May 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smn, if there are no more references to V2, we can remove this to avoid confusion, no?

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.

2 participants