Namespace MIOCore's public API under MC enums - #7
Open
alemohamad wants to merge 2 commits into
Open
Conversation
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.
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 andMC-prefixed types, groups sources into per-namespace folders, and add a committedswift-formatpackage 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
MIOCoreprefix to define a namespace. This PR turns the prefix into a namespace. Call sites go fromMIOCoreIntValue(x)toMCCast.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 toMCRuntimeand stay until the codegen templates are updated (it's a separate cross-package work).