Skip to content

Add options.createLocalPackageGroups to suppress local package folder references - #1631

Open
vahan3x wants to merge 2 commits into
yonaskolb:masterfrom
vahan3x:feature/suppress-local-package-group
Open

vahan3x wants to merge 2 commits into
yonaskolb:masterfrom
vahan3x:feature/suppress-local-package-group

Conversation

@vahan3x

@vahan3x vahan3x commented Jul 17, 2026

Copy link
Copy Markdown

Local Swift packages get a dual representation in generated projects: the XCLocalSwiftPackageReference shown under Package Dependencies (desirable) and a redundant folder PBXFileReference in a group, Packages by default (often not). options.localPackagesGroup: "" only relocates that folder to the project root; it cannot remove it (see #1209).

This adds options.createLocalPackageGroups (default true). When set to false, XcodeGen still emits the package reference so Package Dependencies is populated, but skips the folder reference/group for all local packages — matching what Xcode produces via "Add Package Dependencies… → Add Local".

Default true = current output preserved byte-for-byte (no fixture changes needed)
New tests: spec parsing (default + explicit false + encode/decode round-trip) and generator behavior (no Packages group / folder refs, package references intact)
Docs (ProjectSpec.md) and CHANGELOG.md updated

vahan3x and others added 2 commits July 17, 2026 18:56
Resolve CHANGELOG conflict by moving the entry into the Next Version section and filling in the PR number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

2 participants