Skip to content

Namespace MIOCore's public API under MC enums - #7

Open
alemohamad wants to merge 2 commits into
miolabs:masterfrom
alemohamad:refactor/miocore-namespacing
Open

Namespace MIOCore's public API under MC enums#7
alemohamad wants to merge 2 commits into
miolabs:masterfrom
alemohamad:refactor/miocore-namespacing

Conversation

@alemohamad

Copy link
Copy Markdown
Contributor

This is a large PR and deserves careful review. It touches MIOCore's entire public API surface, so it's worth reading closely rather than skimming.

Reorganizes MIOCore's public surface into real Swift namespaces using enums and MC-prefixed types, groups sources into per-namespace folders, and add a committed swift-format package style. It's fully backward-compatible: every old symbol lives on as a deprecated one-line forward, so no downstream package needs a change to keep building.

Motivation

MIOCore read as "structureless": around 40 free functions at module scope using a hand-rolled MIOCore prefix to define a namespace. This PR turns the prefix into a namespace. Call sites go from MIOCoreIntValue(x) to MCCast.int(x): grouped signatures become autocomplete-discoverable, each gets a DocC landing symbol, and the brand reads as one structure.

Backward compatibility

Every renamed symbol is kept as an @available(*, deprecated, renamed:) one-line forward, so downstream compiles unchanged and gets a rename fix-it.

Two exceptions stay non-deprecated on purpose: _MIOCoreRegisterClass / _MIOCoreClassFromString. Code generators include these into the generated files, so deprecating now would flood generated code with unfixable warnings. They forward to MCRuntime and stay until the codegen templates are updated (it's a separate cross-package work).

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.

1 participant