Conversation
- Update Package.swift to include ObjectArchiveKit dependency - Introduce MachOArchiveKit target with dependencies - Implement machOFiles() method in ArchiveFile for Mach-O members - Implement archiveFiles() method in FatFile for Unix `ar` archives - Create exported.swift for @_exported imports - Change FatFile.url property to public - Modify MachOFile initializer access level
- Changed originHash in Package.resolved - Updated revision and version for ObjectArchiveKit
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class support for Unix ar archives (.a) in the context of Mach-O parsing, including fat static libraries containing per-architecture archives.
Changes:
- Introduces a new
MachOArchiveKittarget that bridgesMachOKitwithObjectArchiveKitvia convenience extensions. - Adjusts
MachOFileinitialization to be package-visible and to throw on invalid Mach-O magic. - Exposes
FatFile.urlpublicly to support cross-module helpers.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/MachOKit/MachOFile.swift | Makes core initializer package and adds invalid-magic validation before endianness handling. |
| Sources/MachOKit/FatFile.swift | Exposes url publicly for downstream helpers. |
| Sources/MachOArchiveKit/Util/exported.swift | Re-exports MachOKit and ObjectArchiveKit from the new module. |
| Sources/MachOArchiveKit/FatFile+Archive.swift | Adds helper to create ArchiveFile views for fat slices. |
| Sources/MachOArchiveKit/ArchiveFile+MachOFile.swift | Adds helper to create MachOFile views for Mach-O members within an archive. |
| Package.swift | Adds ObjectArchiveKit dependency, adds MachOArchiveKit target, and wires it into tests. |
| Package.resolved | Pins ObjectArchiveKit dependency version/revision. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Implement tests for BSD and Darwin64 symbol tables
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.
closes #265
https://github.com/p-x9/ObjectArchiveKit