@@ -23,7 +23,7 @@ import struct TSCUtility.BuildFlags
2323
2424public struct XcodeprojOptions {
2525 /// The build flags.
26- public var flags : BuildFlags
26+ public var flags : PackageModel . BuildFlags
2727
2828 /// If provided, a path to an xcconfig file to be included by the project.
2929 ///
@@ -46,7 +46,7 @@ public struct XcodeprojOptions {
4646 public var manifestLoader : ManifestLoader ?
4747
4848 public init (
49- flags: BuildFlags = BuildFlags ( ) ,
49+ flags: PackageModel . BuildFlags = PackageModel . BuildFlags ( ) ,
5050 xcconfigOverrides: AbsolutePath ? = nil ,
5151 isCodeCoverageEnabled: Bool ? = nil ,
5252 useLegacySchemeGenerator: Bool ? = nil ,
@@ -64,9 +64,9 @@ public struct XcodeprojOptions {
6464
6565public enum XcodeProject {
6666 // Determine the path of the .xcodeproj wrapper directory.
67- public static func makePath( outputDir: AbsolutePath , projectName: String ) -> AbsolutePath {
67+ public static func makePath( outputDir: AbsolutePath , projectName: String ) throws -> AbsolutePath {
6868 let xcodeprojName = " \( projectName) .xcodeproj "
69- return AbsolutePath ( xcodeprojName, relativeTo: outputDir)
69+ return try AbsolutePath ( validating : xcodeprojName, relativeTo: outputDir)
7070 }
7171
7272 /// Generates an Xcode project and all needed support files. The .xcodeproj
@@ -146,7 +146,7 @@ public enum XcodeProject {
146146 ///// For framework targets, generate target.c99Name_Info.plist files in the
147147 ///// directory that Xcode project is generated
148148 let name = target. infoPlistFileName
149- try open ( AbsolutePath ( name, relativeTo: xcodeprojPath) ) { print in
149+ try open ( AbsolutePath ( validating : name, relativeTo: xcodeprojPath) ) { print in
150150 print ( """
151151 <?xml version= " 1.0 " encoding= " UTF-8 " ?>
152152 <plist version= " 1.0 " >
@@ -246,7 +246,7 @@ public enum XcodeProject {
246246 // -Package so its name doesn't collide with any products or target with
247247 // same name.
248248 let schemeName = " \( graph. rootPackages [ 0 ] . manifest. displayName) -Package.xcscheme " // TODO: use identity instead?
249- try open ( AbsolutePath ( schemeName, relativeTo: schemesDir) ) { stream in
249+ try open ( AbsolutePath ( validating : schemeName, relativeTo: schemesDir) ) { stream in
250250 legacySchemeGenerator (
251251 container: schemeContainer,
252252 graph: graph,
0 commit comments