Skip to content

Extension sources are represented by one tagged value #2856

Description

@jsmestad

Parent Epic: #2813

Type: Chore

Related work: #211

What

Extension.Entry stores a source_type discriminator beside nullable path, git, hex, and module fields, allowing contradictory and incomplete source combinations.

Why

Tagged source data makes invalid combinations unrepresentable and gives install, compile, update, lazy-load, and display paths exhaustive matches.

Acceptance Criteria

  1. Extension.Entry carries one tagged source value with the required payload for path, git, Hex, or module sources.
  2. Constructors reject incomplete source data structurally rather than through downstream guards.
  3. Loaded runtime module identity remains separate when it is not part of source identity.
  4. Install, compile, update, lazy-load, display, persistence, and reload behavior remains compatible.
  5. Table-driven tests cover every source variant and reject invalid construction.

Developer Notes

Approach: Replace source_type plus nullable companion fields with tagged tuples or focused source structs. Put source-specific accessors and transitions on the owning value.

Files/areas: lib/minga/extension/entry.ex, lib/minga/extension/supervisor.ex, lib/minga/extension/lazy.ex, extension source tests

Testing: Run extension path, git, Hex, module, lazy-load, reload, update, and persistence suites.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions