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:
9494 edit (e.g sourcekitdAPI-InProc.cpp). (default: --infer-args)
9595 --prefer-folder-refs/--no-prefer-folder-refs
9696 Whether to prefer folder references for groups containing non-source
97- files (default: --no- prefer-folder-refs)
97+ files (default: --prefer-folder-refs)
9898 --buildable-folders/--no-buildable-folders
9999 Requires Xcode 16: Enables the use of "buildable folders", allowing
100100 folder references to be used for compatible targets. This allows new
@@ -103,7 +103,7 @@ PROJECT CONFIGURATION:
103103
104104 Only supported for targets that have no per-file build settings. This
105105 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)
107107
108108MISC:
109109 --project-root-dir <project-root-dir>
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ struct ProjectOptions: ParsableArguments {
205205 files
206206 """
207207 )
208- var preferFolderRefs : Bool = false
208+ var preferFolderRefs : Bool = true
209209
210210 @Flag (
211211 name: . customLong( " buildable-folders " ) , inversion: . prefixedNo,
@@ -220,7 +220,7 @@ struct ProjectOptions: ParsableArguments {
220220 cannot currently use buildable folders.
221221 """
222222 )
223- var useBuildableFolders : Bool = false
223+ var useBuildableFolders : Bool = true
224224
225225 @Option ( help: . hidden)
226226 var blueFolders : String = " "
Original file line number Diff line number Diff line change @@ -288,6 +288,34 @@ struct SwiftXcodegen: AsyncParsableCommand, Sendable {
288288 return task
289289 }
290290
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+
291319 func generate( ) async throws {
292320 let buildDirPath = buildDir. absoluteInWorkingDir. resolvingSymlinks
293321 log. info ( " Generating project for ' \( buildDirPath) '... " )
@@ -342,6 +370,7 @@ struct SwiftXcodegen: AsyncParsableCommand, Sendable {
342370 try lldbLLVMWorkspace. write ( " LLDB+LLVM " , into: outputDir)
343371 }
344372 }
373+ showCaveatsIfNeeded( )
345374 }
346375
347376 func run( ) async {
You can’t perform that action at this time.
0 commit comments