Implement ADR-030: Layered Crate Public API Design #266

Closed
opened 2025-12-31 16:48:09 -08:00 by jwilger · 1 comment
jwilger commented 2025-12-31 16:48:09 -08:00 (Migrated from github.com)

Summary

Implement ADR-030 to establish a minimal, layered public API for the EventCore crate ecosystem.

Background

ADR-030 establishes that:

  • eventcore crate exports only what application developers need
  • eventcore-types crate is for backend implementers
  • Internal types like ProjectionRunner, PollConfig, PollMode, EventRetryConfig should NOT be exported

Acceptance Criteria

  • eventcore exports only: execute, run_projection, RetryPolicy, BackoffStrategy, ExecutionResponse, MetricsHook, RetryContext, Command derive, require! macro
  • Re-exports from eventcore-types limited to: CommandLogic, CommandStreams, CommandError, Event, StreamId, StreamDeclarations, NewEvents, StreamResolver, Projector, FailureContext, FailureStrategy, StreamPosition, ProjectionError, DelayMilliseconds, AttemptNumber
  • ProjectionRunner removed from public API (internal only)
  • PollMode, PollConfig, EventRetryConfig, NoCheckpointStore removed from public API
  • All integration tests updated to import backend types from eventcore-types
  • ARCHITECTURE.md updated to reflect the layered API design
  • All tests pass

Sub-Issues

This epic should be broken into smaller issues:

  1. Update eventcore/src/lib.rs exports
  2. Update eventcore/src/projection.rs to import from eventcore-types directly
  3. Update integration tests to use dual imports
  4. Update ARCHITECTURE.md
  5. Add migration guide to CHANGELOG
  • ADR-030: Layered Crate Public API Design
  • ADR-010: Free Function API Design Philosophy
  • ADR-029: Projection Runner API Simplification
## Summary Implement ADR-030 to establish a minimal, layered public API for the EventCore crate ecosystem. ## Background ADR-030 establishes that: - `eventcore` crate exports only what application developers need - `eventcore-types` crate is for backend implementers - Internal types like `ProjectionRunner`, `PollConfig`, `PollMode`, `EventRetryConfig` should NOT be exported ## Acceptance Criteria - [ ] `eventcore` exports only: `execute`, `run_projection`, `RetryPolicy`, `BackoffStrategy`, `ExecutionResponse`, `MetricsHook`, `RetryContext`, `Command` derive, `require!` macro - [ ] Re-exports from `eventcore-types` limited to: `CommandLogic`, `CommandStreams`, `CommandError`, `Event`, `StreamId`, `StreamDeclarations`, `NewEvents`, `StreamResolver`, `Projector`, `FailureContext`, `FailureStrategy`, `StreamPosition`, `ProjectionError`, `DelayMilliseconds`, `AttemptNumber` - [ ] `ProjectionRunner` removed from public API (internal only) - [ ] `PollMode`, `PollConfig`, `EventRetryConfig`, `NoCheckpointStore` removed from public API - [ ] All integration tests updated to import backend types from `eventcore-types` - [ ] `ARCHITECTURE.md` updated to reflect the layered API design - [ ] All tests pass ## Sub-Issues This epic should be broken into smaller issues: 1. Update `eventcore/src/lib.rs` exports 2. Update `eventcore/src/projection.rs` to import from `eventcore-types` directly 3. Update integration tests to use dual imports 4. Update ARCHITECTURE.md 5. Add migration guide to CHANGELOG ## Related - ADR-030: Layered Crate Public API Design - ADR-010: Free Function API Design Philosophy - ADR-029: Projection Runner API Simplification
jwilger commented 2025-12-31 17:32:19 -08:00 (Migrated from github.com)

Closing: Created prematurely before ADR-030 was accepted and synthesized into ARCHITECTURE.md. Will recreate after proper process.

Closing: Created prematurely before ADR-030 was accepted and synthesized into ARCHITECTURE.md. Will recreate after proper process.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jwilger/eventcore#266
No description provided.