Widen Chronicle client-docs tabs to real Elixir parity#25
Open
woksin wants to merge 5 commits into
Open
Conversation
Chronicle's shared docs previously fell back to C#-only or C#+TypeScript-only tabs in many places because Elixir coverage was never written, not because the SDK lacked the capability. Add real, source-verified Elixir snippets everywhere an equivalent API exists (events, reactors, reducers, projections, constraints, compliance, subscriptions, seeding, event migrations, dynamic tags, correlation/identity/causation, and more), and add explicit "not supported" stubs for the confirmed genuine gaps so every tab is either real or honestly scoped, never silently missing. Trims Elixir client-specific pages that duplicated shared concept explanations down to cross-links into the shared docs, adds a shared Jobs/Webhooks page (previously undocumented anywhere but Elixir and TypeScript, at inconsistent depth), and adds a real Elixir event-seeding guide (replacing a stale placeholder).
Its second snippet was bare top-level code (not wrapped in a def), and wasn't registered in BODY_SNIPPETS, so the generated test file placed it directly at module scope where it executes immediately on load instead of only being compiled. It called Chronicle.get_event_stores() against an unconfigured client and crashed the whole snippet-compilation test. Register it in BODY_SNIPPETS, matching the established get-started/client-flow precedent, so both of its snippets are wrapped in never-invoked functions.
use Chronicle.Events.EventType requires an :id (Keyword.fetch!, unlike ReadModel/Reactor/Reducer/Projection's optional id which defaults to the module name) — these snippets omitted it, which crashes with a KeyError at macro-expansion time. Add a stable id to each.
…ir toolchain The validator concatenates every snippet into one file and compiles it, so a struct used before its own defmodule is textually processed fails to expand at compile time (Elixir does not reliably forward-reference structs across top-level modules within one compiled unit) — surfaced now that a real Elixir/OTP toolchain actually ran this for the first time: - projections/filtering/appending-with-metadata.md referenced FilteringOrderPlaced (defined in the alphabetically-later basic.md). Made it self-contained with its own locally-scoped event instead of relying on file ordering, matching the safer established pattern. - tutorial/first-event/append.md and tutorial/reacting/explicit-append.md reference structs defined in alphabetically-later sibling files (book-added.md, notification-sent-event.md/waitlist-notifier.md). Deferred both via BODY_SNIPPETS so they compile after all real modules, matching get-started/client-flow's established precedent, instead of renaming files that are also referenced by the shared docs and other clients. - projections/model-bound/removal/basic.md called removed_with/1, but the macro is only imported at arity 2 (Chronicle.ReadModels.ReadModel's __using__ explicitly imports removed_with: 2, not removed_with: 1) — add the required empty options list. - concepts/correlation-identity-causation/correlation.md aliased Chronicle.CorrelationId, but the real module is Chronicle.Correlation.CorrelationId.
…eterminism CI's parallel compiler runs with fewer schedulers (max_cases: 8) than this session's local runs (24), and struct-forward-reference failures are scheduling-dependent — a file that referenced another file's not-yet-textually-processed struct could pass locally and still fail in CI, as just happened with tutorial/reacting/reading-state.md and waitlist-notifier.md. Systematically swept the whole corpus for every remaining alias to a struct/module defined in a different snippet file and deferred all of them via BODY_SNIPPETS (matching the established get-started/client-flow precedent), rather than continuing to fix them one CI round-trip at a time. Verified locally across multiple seeds with schedulers constrained to match CI (+S 4:4).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
Changed