Skip to content

Commit 67f3cb1

Browse files
committed
[xcodegen] Enable buildable folders by default
I've been living on this for a bit without issue, enable by default.
1 parent 23e3f5f commit 67f3cb1

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

utils/swift-xcodegen/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ PROJECT CONFIGURATION:
8989
edit (e.g sourcekitdAPI-InProc.cpp). (default: --infer-args)
9090
--prefer-folder-refs/--no-prefer-folder-refs
9191
Whether to prefer folder references for groups containing non-source
92-
files (default: --no-prefer-folder-refs)
92+
files (default: --prefer-folder-refs)
9393
--buildable-folders/--no-buildable-folders
9494
Requires Xcode 16: Enables the use of "buildable folders", allowing
9595
folder references to be used for compatible targets. This allows new
@@ -98,7 +98,7 @@ PROJECT CONFIGURATION:
9898
9999
Only supported for targets that have no per-file build settings. This
100100
unfortunately means some Clang targes such as 'lib/Basic' and 'stdlib'
101-
cannot currently use buildable folders. (default: --no-buildable-folders)
101+
cannot currently use buildable folders. (default: --buildable-folders)
102102
103103
MISC:
104104
--project-root-dir <project-root-dir>

utils/swift-xcodegen/Sources/swift-xcodegen/Options.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ struct ProjectOptions: ParsableArguments {
200200
files
201201
"""
202202
)
203-
var preferFolderRefs: Bool = false
203+
var preferFolderRefs: Bool = true
204204

205205
@Flag(
206206
name: .customLong("buildable-folders"), inversion: .prefixedNo,
@@ -215,7 +215,7 @@ struct ProjectOptions: ParsableArguments {
215215
cannot currently use buildable folders.
216216
"""
217217
)
218-
var useBuildableFolders: Bool = false
218+
var useBuildableFolders: Bool = true
219219

220220
@Option(help: .hidden)
221221
var blueFolders: String = ""

utils/swift-xcodegen/Sources/swift-xcodegen/SwiftXcodegen.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,14 @@ struct SwiftXcodegen: AsyncParsableCommand, Sendable {
292292
let buildDirPath = buildDir.absoluteInWorkingDir.resolvingSymlinks
293293
log.info("Generating project for '\(buildDirPath)'...")
294294

295+
if projectOpts.useBuildableFolders {
296+
log.note("""
297+
Buildable folders are enabled by default, which requires Xcode 16. You \
298+
can pass '--no-buildable-folders' to disable this. See the '--help' entry \
299+
for more info.
300+
""")
301+
}
302+
295303
let projectRootDir = self.projectRootDir?.absoluteInWorkingDir
296304
let buildDir = try NinjaBuildDir(at: buildDirPath, projectRootDir: projectRootDir)
297305
let outputDir = miscOptions.outputDir?.absoluteInWorkingDir ?? buildDir.projectRootDir

0 commit comments

Comments
 (0)