Epoch 2 Migration Plan

This document describes the migration path from the port-maintenance line to libultraship epoch 2 (2.x.x.x).

It is intended for maintainers upgrading an existing port to the second epoch architecture.

Scope

This plan focuses on migration areas with the highest integration impact:


1) Build and versioning baseline

Update build/release assumptions to 4-part epoch semver:

Review optional build toggles introduced in this line:


2) Context creation model (major change)

Epoch 2 centers initialization around ship/core components.

Ports should choose one of two setup styles:

A) CreateDefaultInstance(...) helper-driven setup

Use when you want LUS to create a standard component graph.

Pros

Cons

Use when you want explicit control of startup and dependencies.

Pros

Cons

Practical migration note

Prefer explicit graph assembly when the port has custom window/input/resource/event behavior.


3) Bridge architecture update: singleton component holders

Epoch 2 bridge APIs use cached singleton-like holders for multiple components.

What this means

Bridge calls now depend on those cached pointers being current.

Required lifecycle steps

If caches are stale, runtime faults are likely.


4) Resource system migration

ResourceIdentifier is now central to resource identity and scoping.

Required updates


5) Event system migration

Prefer direct use of Events APIs.

Treat EventSystem naming as compatibility surface where still present.

Required check

Revalidate listener priority behavior and ordering assumptions during migration.


6) Window/GUI/input migration

Key API and lifecycle changes to verify:


7) Validation checklist

Before finalizing migration:

  1. Build all supported targets.
  2. Verify startup and component initialization order.
  3. Validate archive mounting and resource load behavior.
  4. Validate controller/keyboard/mouse flows.
  5. Validate event dispatch ordering.
  6. Validate bridge-backed APIs with cache refresh paths.
  7. Validate clean shutdown (including bridge cache clear behavior).

Suggested execution order

Use small, reviewable migration commits:

  1. Compile-surface changes (includes/types/signatures).
  2. Context creation and lifecycle conversion.
  3. Bridge cache wiring and refresh/clear hooks.
  4. Runtime validation fixes.
  5. Cleanup and dead-code removal.