swift-section 0.12.0#292817
Open
BrewTestBot wants to merge 1 commit into
Open
Conversation
Member
|
Signed-off-by: Rui Chen <rui@chenrui.dev>
f7ef87d to
a6b9663
Compare
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.
Created by
brew bumpCreated with
brew bump-formula-pr.Details
release notes
SwiftInterfacefor both binaries, then runs an ABI diff over the declaration model.--interface, a full interface annotated with+/-/markers — a renderable artifact you can paste into reviews or save as a.diff.DiffFormat:inline(git-diff-style line prefixes),unified(real unified-diff, consumable bygit apply/patch), andmarkdownFenced(```diffblock).SwiftLayout— offline field-offset computation engineA new module that computes the same field-offset / type-layout information the runtime metadata accessor would produce, but directly from the Mach-O file — no
dlopen, no_swift_getTypeByMangledNameInContext, no live process.Coverage in this release:
performBasicLayout.Optional) layouts via the runtimegetEnumTagCountsformulas; multi-payload enums via the__swift5_builtinwhole-type descriptor (compiler-embedded layout) with a structural fallback that reusesEnumLayoutCalculator.any P, compositions,AnyObject,any Error, existential metatypes (incl. imported ObjC protocols, always class-bound).BuiltinTypeLayoutIndex(per-image__swift5_builtin) keyed by demangled qualified name.ImageReferenceindexes__swift5_types,__swift5_protos, and__objc_classlist;ImageUniverseexposes single-image and dependency-closure modes that merge a root with its transitive dependencies, lazily, so a several-hundred-image OS closure is not eagerly demangled.NSObjectet al. starts its own fields at the ObjC ancestor'sinstanceSize, located via the closure's libobjc and read from__objc_classlist.MyBox<Int>is laid out by capturing the depth-0(depth, index) → Nodeargument map and deep-rewriting the base type'sdependentGenericParamTypefield nodes viaNode.Rewriter(purely syntactic; no PWT). Also fixes a latent single-payload-enum bug where the payload would always read the first type argument instead of the right one.fieldLayout(of:genericArguments:)andfieldLayout(forInstantiationMangledName:)lay out a concreteFoo<Int>from a binary's bound-generic mangled reference.Per-field degradation rather than whole-type failure: an unresolvable field reports
FieldResolution.unknowninstead of taking down the entire layout. See StaticLayoutEngine.md and StaticLayoutDependencyClosure.md.Reader-specialized
FieldLayoutRendererFieldLayoutRendererand the surrounding printer pipeline are now generic over the Mach-O reader and dispatch at compile time:MachOImagepath — renders field-offset / type-layout / expanded-tree / enum-layout comments from in-process runtime metadata (the existing behavior).MachOFile(offline) path — renders the same comments statically throughSwiftLayout's engine.The upshot:
swift-section dump/interfaceon a file now emit real field offsets without loading the process. See FieldLayoutRendererReaderSpecialization.md.SwiftDump → leaf:SwiftDeclarationRenderingextractionField-metadata rendering used to live in
SwiftDump. It now lives in a newSwiftDeclarationRenderingmodule shared bySwiftDumpandSwiftInterface, withSwiftDumpreduced to a leaf in the dependency graph. The declaration model is nowCodableend-to-end. See SwiftModularizationMigration.md.Other notable surface
DiffFormat.inline/unified/markdownFenced(pluggable). The inline / markdown forms now insert a one-space gutter so the+/-/marker stays in column 0 and content always starts at column 2; the real-unified-diff path keeps an empty gutter to remain consumable bygit apply/patch.Rowscomponent inswift-semantic-string0.1.5).SwiftDeclarationmodel types are now end-to-endCodable, enabling snapshot pipelines and out-of-process tooling.Bug Fixes
MachOExtensions— cache-residentMachOFiles are now keyed byLC_UUID(preferred) withLC_BUILD_VERSIONas a fallback. The previous build-version-only key collided across dyld cache images that ship the same build version.SwiftPrinting— the static-layout provider is now memoized atomically, and the cached provider is invalidated onupdateConfiguration. Without this, a configuration change could leave stale rendered offsets.SwiftLayout— corrected the 4-byte tag extra-inhabitant count; keyedBuiltinTypeLayoutIndexby demangled qualified name (the descriptor'stypeNameis a symbolic reference whose raw string is empty).SwiftDump— specialized metadata is now resolved through its own reading context, not the indexer's.SwiftDeclarationRendering— non-type generic params are skipped during nested field-offset substitution; previously they could surface as broken offset tags.MachOSwiftSection—GenericParamDescriptor.kindis now total over the documented kinds.SwiftDeclaration— model member ordering is now deterministic across snapshots.Testing
MachOTestingSupport.TestActorglobal actor lets cross-suite fixtures share serial execution without ad-hoc isolation tags.SwiftInterfaceBuilderfixtures retargeted to SwiftUICore so they survive the SwiftUI module split.macOS_26_5_1,macOS_27_0_beta_1) added toDyldSharedCachePath.SwiftLayoutships its own coverage for ObjC-ancestor layouts, builtin whole-type layouts, edge function kinds + ObjC-protocol existentials, structural multi-payload enum layout, concrete bound-generic field substitution, and top-level generic instantiation cross-checked against the runtime.Documentation
All docs are now consolidated under
Documentations/, split into:SwiftEnumLayout.md(+SwiftEnumLayout_zh.md).Documentations/Internal/) — design notes, migration guides, per-phase write-ups for SwiftLayout, and dated per-task reports underInternal/TaskReports/.The
KNOWN_ISSUES.mdfile was removed — both documented concurrency issues are fixed in the current release.Dependencies
swift-demanglingbumped to0.4.3(requiresCodableNode).swift-semantic-stringbumped to0.1.5(adds theRowscomponent used by the printer's per-member comment rows). The remote pin is nowfrom: "0.1.5"rather than an exact version.Requirements
View the full release notes at https://github.com/MxIris-Reverse-Engineering/MachOSwiftSection/releases/tag/0.12.0.