File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ PROJECT CONFIGURATION:
94
94
edit (e.g sourcekitdAPI-InProc.cpp). (default: --infer-args)
95
95
--prefer-folder-refs/--no-prefer-folder-refs
96
96
Whether to prefer folder references for groups containing non-source
97
- files (default: --no- prefer-folder-refs)
97
+ files (default: --prefer-folder-refs)
98
98
--buildable-folders/--no-buildable-folders
99
99
Requires Xcode 16: Enables the use of "buildable folders", allowing
100
100
folder references to be used for compatible targets. This allows new
@@ -103,7 +103,7 @@ PROJECT CONFIGURATION:
103
103
104
104
Only supported for targets that have no per-file build settings. This
105
105
unfortunately means some Clang targes such as 'lib/Basic' and 'stdlib'
106
- cannot currently use buildable folders. (default: --no- buildable-folders)
106
+ cannot currently use buildable folders. (default: --buildable-folders)
107
107
108
108
MISC:
109
109
--project-root-dir <project-root-dir>
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ struct ProjectOptions: ParsableArguments {
205
205
files
206
206
"""
207
207
)
208
- var preferFolderRefs : Bool = false
208
+ var preferFolderRefs : Bool = true
209
209
210
210
@Flag (
211
211
name: . customLong( " buildable-folders " ) , inversion: . prefixedNo,
@@ -220,7 +220,7 @@ struct ProjectOptions: ParsableArguments {
220
220
cannot currently use buildable folders.
221
221
"""
222
222
)
223
- var useBuildableFolders : Bool = false
223
+ var useBuildableFolders : Bool = true
224
224
225
225
@Option ( help: . hidden)
226
226
var blueFolders : String = " "
Original file line number Diff line number Diff line change @@ -288,6 +288,34 @@ struct SwiftXcodegen: AsyncParsableCommand, Sendable {
288
288
return task
289
289
}
290
290
291
+ func showCaveatsIfNeeded( ) {
292
+ guard log. logLevel <= . note else { return }
293
+
294
+ var notes : [ String ] = [ ]
295
+ if projectOpts. useBuildableFolders {
296
+ notes. append ( """
297
+ - Buildable folders are enabled by default, which requires Xcode 16. You
298
+ can pass '--no-buildable-folders' to disable this. See the '--help'
299
+ entry for more info.
300
+ """ )
301
+ }
302
+
303
+ if !projectOpts. addStdlibSwift {
304
+ notes. append ( """
305
+ - Swift standard library targets are disabled by default since they require
306
+ using a development snapshot of Swift with Xcode. You can pass '--stdlib-swift'
307
+ to enable. See the '--help' entry for more info.
308
+ """ )
309
+ }
310
+ guard !notes. isEmpty else { return }
311
+ log. note ( " Caveats: " )
312
+ for note in notes {
313
+ for line in note. components ( separatedBy: . newlines) {
314
+ log. note ( line)
315
+ }
316
+ }
317
+ }
318
+
291
319
func generate( ) async throws {
292
320
let buildDirPath = buildDir. absoluteInWorkingDir. resolvingSymlinks
293
321
log. info ( " Generating project for ' \( buildDirPath) '... " )
@@ -342,6 +370,7 @@ struct SwiftXcodegen: AsyncParsableCommand, Sendable {
342
370
try lldbLLVMWorkspace. write ( " LLDB+LLVM " , into: outputDir)
343
371
}
344
372
}
373
+ showCaveatsIfNeeded( )
345
374
}
346
375
347
376
func run( ) async {
You can’t perform that action at this time.
0 commit comments